This is from: http://pshyperv.codeplex.com/Thread/View.aspx?ThreadId=62355
"these 2 links should help.
http://blogs.technet.com/softienerd/default.aspx
http://pshyperv.codeplex.com/Thread/View.aspx?ThreadId=35417
you can set the reg to unrestricted but set it back later..
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\powershell\1\ShellIds\Microsoft.powershell]
"ExecutionPolicy"="Unrestricted"
unzip the file.. say to z:\
the open powershell command
cd z:\
PS Z:\>
type . .\hyperv.ps1
notice the dot+space+dot+slash.
snippets.. from the links..
try to call . .\hyperv.ps1 ftom the folder the zip was extraced to. notice the dot+space+dot+slash.
Powershell Tip #1
In Powershell, type $profile.
PS C:\Program Files\Microsoft\AxFuzzer> $profile
C:\Users\mengli\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
That points to where your profile is stored at. This is a powershell script that executes upon the start up of any powershell prompt for the current user. Go ahead and make the file. In my case, I made a new file at the location by typing this:
new-item $profile -itemtype file -force
Now, open the file and you can put in things like this:
set-executionpolicy unrestricted
. \\meng\shared\powershell\hyperv.ps1
set-executionpolicy remotesigned
Every new powershell prompt that you"
No comments:
Post a Comment