Weird Write-Host behavior.
so when launch powershell window, , type netsh, netsh prompt expect.
if execute code similar following, every time type netsh, command prompt, no netsh, no error.
for ($i = 0; $i -lt 500 ; $i++)
{
write-host "foo";
}
any ideas?
thanks!
if understand correctly
1) open ps
2)netsh
3)you got netsh prompt
4)you run script for ($i = 0; $i -lt 500 ; $i++) { write-host "foo"; }
5) netsh, , there not netsh prompt anymore
i tried this, , works fine me
here is:
8/30/2011 5:52 pm c:\> netsh
netsh>exit
8/30/2011 5:52 pm c:\> for ($i = 0; $i -lt 500 ; $i++) { write-host "foo"; }
foo
foo
...
foo
8/30/2011 5:52 pm c:\> netsh
netsh>
Windows Server > Windows PowerShell
Comments
Post a Comment