Posts

Showing posts from June, 2018

Synchronize time with external NTP server on Windows Server

UDP 123 port (in- and outbound) on your (corporate) firewall, check with Portquery to find the UDP/TCP listening state. First, locate your PDC Server. Open the command prompt and type:  C:>netdom /query fsmo Log in to your PDC Server and open the command prompt. Stop the W32Time service:  C:>net stop w32time Configure the external time sources, type:  C:> w32tm /config /syncfromflags:manual /manualpeerlist:”0.pool.ntp.org, 1.pool.ntp.org, 2.pool.ntp.org” Make your PDC a reliable time source for the clients. Type:  C:>w32tm /config /reliable:yes Start the w32time service:  C:>net start w32time The windows time service should begin synchronizing the time. You can check the external NTP servers in the time configuration by typing:  C:>w32tm /query /configuration Check the Event Viewer for any errors.

Powershell Moving computer account to specified OU in AD server

Powershell Moving computer account to specified OU in AD server #Importing AD Module Write-Host " Importing AD Module..... " import-module ActiveDirectory Write-Host " Importing Move List..... " # Reading list of computers from csv and loading into variable $MoveList = Import-Csv -Path "C:\computers.csv" # defining Target Path $TargetOU = 'OU=Computers,OU=VA,DC=pugazh,DC=co,DC=in' $countPC    = ($movelist).count Write-Host " Starting import computers ..." foreach ($Computer in $MoveList){        Write-Host " Moving Computer Accounts..."     Get-ADComputer $Computer.CN | Move-ADObject -TargetPath $TargetOU } Write-Host " Completed Move List " Write-Host " $countPC  Computers has been moved "