phandinhlan
phandinhlan

Reputation: 583

Windows 10 IoT Core PowerShell Disk Management Commands

When using PowerShell to connect to a device running Windows 10 IoT Core, I have unable to access disk management commands where I other could on a normal PC. Are these commands not available at all or I'll have to do something to get them working?

Example commands:

Upvotes: 3

Views: 1263

Answers (1)

briantist
briantist

Reputation: 47842

Windows 10 IoT uses the .Net Micro Framework, which does not have all of the available libraries of the full .Net framwork.

PowerShell is based on .Net, so the the available modules and cmdlets depend on the underlying capabilities of the framework.

There will be a fair amount of functionality missing on IoT.

Unfortunately, to my knowledge there is no documented list of what is or isn't available between PowerShell on IoT and full .Net.

Make use of Get-Command and Get-Module to see on the system itself what's there. If you don't see the command, it's probably just not available.

From the Win 10 IoT PowerShell Page

(thanks TheMadTechnician)

Issue: 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 seem to work either.

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

Upvotes: 2

Related Questions