So I am finally getting around to posting some of the code from this weeks PowerShell class. As always, I’m listening to my class and I am not afraid to deviate from the lessons when someone comes up with a good idea. While teaching about PowerShell remoting, I was asked if it is possible to rename remote clients. Sure it is! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 $Cred = Get-Credential -Credential MCTExpert\AdminAccount $OldName = "CL1" $NewName = "Client1" Invoke-Command -ComputerName $OldName -ScriptBlock { Param ( $C , $NN ) $Name = HostName $Splat = @{ "NewName" = $NN "Restart" = $True "Force" = $True "PassThru" = $True "DomainCredential" = $C } Rename-Computer @Splat } -ArgumentList $Cred , $NewName Line Details 1 Ask for the domain credentials of someone who h
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.