Month: March 2017

Office 365 : Turn Off Directory Synchronization

Posted on Updated on

You can use powershell to turn off directory synchronization between AD-Onpremises and Office 365.

To turn off directory synchronization :

Open Windows Azure Active Directory Module for Windows Powershell ( first, you need to install, you can download it, refer to this following link ).

Connect to Office 365 Powershell, Type Credential user & password Office 365 :

$UserCredential = Get-Credential

Import session Msolservice and type credential user & password office 365 :


And run this command to turn off dirsync :

Set-MsolDirSyncEnabled -EnableDirSync $false


Reference :

Azure AD Connect Sync : Change Default Configuration Sync Interval Time

Posted on

By default sync interval time between ad-onpremises & office 365 is 30 minutes.

you can custome sync interval time use this command :

Set-ADSyncScheduler -CustomizedSyncCycleInterval 00:00:01

note : in this case i want sync interval time 1 second

now you can check use this command Get-ADSyncScheduler

Use Powershell to Add Multiple DHCP Scope

Posted on

This article will describe how to create multiple dhcp scope on dhcp server using powershell with csv.

Create CSV file, example :


after you created csv file, for example my csv file name is scope.csv.

run this command :

Import-Csv –Path C:\scope.csv | Add-DhcpServerv4Scope -ComputerName SERVERDHCP -State Active

Good luck