Hi,
Previously we used to use psexec and execute reg and bat files on remote servers. Since we've upgrade all our servers to 2008 we the company would like us to use ps-remoting/Win-RM etc...
The ip's of the machines i would like to interact with are in a text file.
This is my current ps1 script:
do {
cls
Get-Content C:\IPS.txt | Foreach-Object {Invoke-Command $_ -Credential {Set-Location "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon";Set-ItemProperty . -name DefaultUserName -value "A-TEST"}}
write-host "Running Test Done"
$response = Read-Host "Did the script error? Press y to run it again or press n to continue"
}
while ($response -match 'y')
If I run this from my machine it works. It successfully updates the registry on the machines, but I get no feedback on screen, meaning I don't see what it's actually doing in the console window.
How can I get powershell do display on screen?
Thanks
Previously we used to use psexec and execute reg and bat files on remote servers. Since we've upgrade all our servers to 2008 we the company would like us to use ps-remoting/Win-RM etc...
The ip's of the machines i would like to interact with are in a text file.
This is my current ps1 script:
do {
cls
Get-Content C:\IPS.txt | Foreach-Object {Invoke-Command $_ -Credential {Set-Location "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon";Set-ItemProperty . -name DefaultUserName -value "A-TEST"}}
write-host "Running Test Done"
$response = Read-Host "Did the script error? Press y to run it again or press n to continue"
}
while ($response -match 'y')
If I run this from my machine it works. It successfully updates the registry on the machines, but I get no feedback on screen, meaning I don't see what it's actually doing in the console window.
How can I get powershell do display on screen?
Thanks