Reputation: 171
I'm trying to create a shortcut on the desktop:
%windir%\system32\WindowsPowerShell\v1.0\powershell.exe -noexit -command import-module \\fs\PS\MyModule\MyModule.dll
That is working. Furthermore I want to read all commands of that module, after opening PS automatically. How do I append the following:
get-commands -Module MyModule
Thx piccus
Upvotes: 0
Views: 955
Reputation: 17492
try somesthing like this
powershell.exe -noexit -command "& { import-module \\fs\PS\MyModule\MyModule.dll; ... others command ...}"
Upvotes: 2