Powershell: Difference between revisions

From Leo's Notes
This page was last edited on 19 July 2013, at 17:22.
No edit summary
Line 1: Line 1:


== Get machine UIUD ==
get-wmiobject Win32_ComputerSystemProduct  | Select-Object -ExpandProperty UUID





Revision as of 17:22, 19 July 2013

Get machine UIUD

get-wmiobject Win32_ComputerSystemProduct  | Select-Object -ExpandProperty UUID


Troubleshooting

Error: "File cannot be loaded because the execution of scripts is disabled on this system"

To allow untrusted script execution, open a powershell instance (same arch as what you're trying to run the script as. ie: 64bit/32bit) as Administrator and run:

PS> set-executionpolicy unrestricted

You should now be able to see:

PS> get-executionpolicy
Unrestricted