I am using Windows 2008 r2 64 bit system.
While testing our script ,we did right click on powershell (which is present in taskbar) and import system modules.
Our scripts will be used while deployment. So in destination machine we are not sure whether all system modules are imported or not?
How to make import all the system modules imported if not imported already?
There's a hidden powershell switch to load system modules:
powershell.exe -ImportSystemModules
System modules reside in the $pshome\modules folder. The equivalent command to load them would be:
Get-Module -ListAvailable | Where-Object {$_.Path -like "$PSHOME*"} | Import-Module
UPDATE:
The -ImportSystemModules switch has no impact in v3, looks like it is going away.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With