Home » Archive by category "Uncategorized"

Testing open ports With PowerShell

We can use PowerShell to test remote port connectivity without installing telnet and with the use of the Test-NetConnection command. To check if the remote...

Get DC replication time response

foreach($d in (get-adforest).domains){$v = Measure-Command {get-addomaincontroller -Filter * -Server $d}Write-Output “Took $($v.TotalSeconds) to Enumerate DCS in $d “}

Get Password Policye for all domains in a forest.

Get Password Policy for all domains in a forest..   (Get-ADForest).domains | %{​Get-ADDefaultDomainPasswordPolicy -Identity $_ }​ | Select-Object * | Export-Csv -Path C:\Reports\DefaultPasswordPolicy-All.csv -NoTypeInformation Having...

KMS activation

How do I manually connect my Windows or Windows Server device to the KMS activation server? Right Click on the Start menu and select Command Prompt (Admin) Run...

Delete User profiles using DELPROF2

Create .csv file with  column name “Computername” $servers = import-csv C:\Temp\servers.csv $comps = ($servers).ComputerName $comps | %{ New-Item -ItemType Directory -Force \\$PSItem\c$\Temp; Copy-Item C:\Temp\Delprof \\$PSItem\c$\Temp\Delprof...

Get DHCP Scopes using PowerShell

We need DHCP PowerShell cmdlet to be available in order to manage DHCP. By default, the DHCP module is not loaded in PowerShell. We need...

Power off multiple VM’s

 Connect to Vcenter Connect-viserver vc.abc.com Stop-VM -VM (gc C:\Temp\serverlist.txt)  -Confirm:$false