Thursday, 20 December 2018

Exporting and Importing DHCP database

netsh dhcp server export c:\dhcp.txt all




 netsh dhcp server import c:\dhcp.txt all




Unauthorizing a DHCP Server:

How to Use PowerShell ISE to Trigger a Full Password Sync in Azure AD Sync



$adConnector = "xxx.com"
$aadConnector = "xxx.com.my - AAD"

Import-Module adsync

$c = Get-ADSyncConnector -Name $adConnector

$p = New-Object Microsoft.IdentityManagement.PowerShell.ObjectModel.ConfigurationParameter "Microsoft.Synchronize.ForceFullPasswordSync", String, ConnectorGlobal, $null, $null, $null

$p.Value = 1

$c.GlobalParameters.Remove($p.Name)

$c.GlobalParameters.Add($p)

$c = Add-ADSyncConnector -Connector $c

Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $false

Set-ADSyncAADPasswordSyncConfiguration -SourceConnector $adConnector -TargetConnector $aadConnector -Enable $true

Wednesday, 19 December 2018

Azure AD Connect


Connect with the Microsoft Azure Active Directory Module for Windows PowerShell:


 






Windows PowerShell Version Check:
$psversiontable














Install required software:
Install-Module MSOnline
 
Creates a credential object:
$cred = Get-Credential


Connect to all Office 365 services:
Connect-MsolService -Credential $cred


 

Gets company-level information:
Get-MsolCompanyInformation 















Stop the scheduler:
Stop-ADSyncSyncCycle


Turn off directory synchronization:
Set-MsolDirSyncEnabled -EnableDirsync $false



See Scheduler configuration:
Get-ADSyncScheduler














Start the scheduler:
The scheduler is by default run every 30 minutes, It could be that you have an urgent change that must be synchronized immediately.
Delta sync cycle:
Start-ADSyncSyncCycle -PolicyType Delta
Full sync cycle:
Start-ADSyncSyncCycle -PolicyType Initial
Turn on directory synchronization:
Set-MsolDirSyncEnabled -EnableDirSync $true






Gets the directory synchronization settings:
When installing Azure AD Connect, prevent accidental deletes is enabled by default and configured to not allow an export with more than 500 deletes.
Get-MsolDirSyncConfiguration




Gets the status of identity synchronization features for a tenant:
Get-MsolDirSyncFeature

 
Azure AD Connect: Automatic upgrade:
Making sure your Azure AD Connect installation is always up to date.
Set-ADSyncAutoUpgrade -AutoUpgradeState Enabled