—-Connect to the Domain
Connect to domain over powershell
Rename-Computer -NewName “Server044” -DomainCredential Domain01\Admin01 -Restart
——Set an IP Address in powershell (CORE)
Get-newIPaddress
New-NetIPaddress -InterfaceIndex 12 -IPAddress 192.0.2.2 -PrefixLength 24 -DefaultGateway 192.0.2.1
— Check if a TCP Port is open on a remote machine
tnc cloud2web.com.au -port 443
—-Check every interval if a port is open on a remote host
$timer = new-timespan -Minutes 1
$clock = [diagnostics.stopwatch]::StartNew()
while ($clock.elapsed -lt $timer){
cls
`r`n
tnc cloud2web.com.au -port 443
start-sleep -seconds 1
}
write-host “Timer end”