Disk Management Commands in PowerShell for Windows IoT device

0 votes

While using PowerShell for connecting to a device running Windows 10 IoT Core, I was unable to access disk management commands, which I'm, otherwise, able to access on a normal PC.

So, are these commands completely unavailable or is there something I'd have to do for getting them to work?

For instance, commands like these:

  • get-disk
  • initialize-disk
  • get-partition​
TIA!
Nov 26, 2018 in IoT (Internet of Things) by Bharani
• 4,660 points
1,093 views

1 answer to this question.

0 votes

All libraries of the full .Net framework is not available to the Windows 10 IoT, which also uses the .Net Micro Framework. Plus, PowerShell is based on .Net as well, which essentially means that its available modules and cmdlets will only depend upon the capabilities of its underlying framework. So, a fair amount of functionality would be obviously be missing in the systems of IoT.

Although, there hasn't really been a documented list of availability on all components between IoT's PowerShell and a full .Net framework that will be a part of these minimal operating software packages.

Thus, you can make use of Get-Command and Get-Module to see exactly what's available on your system. And, If there's a command that you can't find, then it's most probably just not available.

Also, please note: A known bug in PowerShell security policies causes the following issues to manifest within the remote session:

  • Get-Help returns unexpected matches.
  • Get-Command on a specified module returns empty command list.
  • Running a cmdlet from any of these modules throws CommandNotFoundException: Appx, NetAdapter, NetSecurity, NetTCPIP, PnpDevice.
  • Import-Module on any of the above modules throws PSSecurityException exception with UnauthorizedAccess. Module auto loading does not work either.

Workaround: Modify the execution policy within the remote PowerShell session to "RemoteSigned". For details on different execution policies, please refer: https://technet.microsoft.com/en-us/library/ee176961.aspx.

answered Nov 26, 2018 by nirvana
• 3,130 points

Related Questions In IoT (Internet of Things)

0 votes
1 answer

RPMs for IoT Agents of Backend Device Management GE in FIWARE IoT ecosystem

The RPMs for IDAS component are availaible. ...READ MORE

answered Jul 30, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
818 views
0 votes
1 answer

Publishing commands to device in IBM IoT using MQTT in Java

If you are publishing from an application, ...READ MORE

answered Jul 27, 2018 in IoT (Internet of Things) by anonymous2
• 4,240 points
1,506 views
0 votes
1 answer

Device EndPoint Management in Kaa IoT

Normally you could just request access tokens ...READ MORE

answered Aug 3, 2018 in IoT (Internet of Things) by DataKing99
• 8,250 points
1,262 views
0 votes
1 answer

Device management tools for IOT/M2M supporting telecom and IOT devices

We (Cumulocity) offer an out-of-the-box device management. ...READ MORE

answered Mar 15, 2019 in IoT (Internet of Things) by Upasana
• 8,620 points
750 views
0 votes
1 answer

Setting time on Raspberry Pi using just PowerShell

The Enter-PSSession is for interactive sessions, so ...READ MORE

answered Aug 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
969 views
+1 vote
1 answer

Create a User Account in Windows 10 with PowerShell.

Hi@akhtar, To create a new user account without ...READ MORE

answered Oct 7, 2020 in Others by MD
• 95,460 points
810 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Display time in a Windows Core IoT app with a clock!

It is possible, but you should understand ...READ MORE

answered Jul 10, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,554 views
0 votes
1 answer

Data Modelling for IoT based application in Apache Cassandra

I think creating a single table that has ...READ MORE

answered Dec 4, 2018 in IoT (Internet of Things) by nirvana
• 3,130 points
1,719 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP