Compare cert salaries and plan your next career move
Import-module ActiveDirectory $arrComputers = Get-ADComputer -SearchBase 'OU=xxx,DC=xxx,DC=local' -Filter {Name -like 'xxx*'} # Specify Base OU and Server Name here Foreach ($objComputer in $arrComputers) { $strComputer = $objComputer.dnshostname $objPing = new-object system.net.networkinformation.ping $strPingResult = $objPing.Send($strComputer) if ($strPingResult.status -eq 'Success') { $ObjBaseReg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine",$strComputer) $ObjTargetReg = $objBaseReg.OpenSubKey('System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-TCP') if ($ObjTargetReg.GetValue('UserAuthentication') -ne 0) { #$ObjTargetReg.SetValue('UserAuthentication',0) "$strComputer - Changing Value" } } Else { "$strComputer is Offline" } $strPingResult = $null }
Compare salaries for top cybersecurity certifications. Free download for TechExams community.