Renew IP on Machines Remotely with Powershell Invoke-Command

Import-Module activedirectory $XDMachines = Get-ADComputer -LDAPFilter “(name=*)”-SearchBase “OU=XenDesktop-VMs,OU=WorkStations,DC=mulpuru,DC=local” foreach ($XDMachine in $XDMachines) { if(Test-Connection -ComputerName $XDMachine.Name -Quiet -Count 1) { Invoke-Command -ComputerName $XDMachine.Name -ScriptBlock { ipconfig /renew} } }

WordPress Appliance - Powered by TurnKey Linux