i have an issue at the moment - i need to Script or Try to script a way to remove Local Accounts from Multiple machines, we have a list of about 300 Servers and a list of accounts.
The only way we can connect is via PS Remoting, so i need to know som pointers on this :
i have the below :
Code: Select all
$Computers = Get-Content C:\script\Computers.txt
ForEach ($Computer in $Computers) {
$Session = New-PSSession -ComputerName $Computer
Invoke-Command -Session $session -ScriptBlock {}
I also need to add some output to this to see if the account has been deleted .
Any help would be greatly appreciated.
TIA
Paul