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 https://technet.microsoft.com/en-us/library/dn975125.aspx ).

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

$UserCredential = Get-Credential

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

Connect-MsolService

And run this command to turn off dirsync :

Set-MsolDirSyncEnabled -EnableDirSync $false

 

Reference : https://support.office.com/en-us/article/Turn-off-directory-synchronization-for-Office-365-ee5f861e-bd48-4267-83d1-a4ead4b4a00d

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 :

Name,StartRange,EndRange,SubnetMask,Router
hrd,10.100.11.2,10.100.11.254,255.255.255.0,10.100.11.1
it,10.100.12.2,10.100.12.254,255.255.255.0,10.100.12.1
bod,10.100.13.2,10.100.13.254,255.255.255.0,10.100.13.1

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