How to calculate immutableID using Powersell

I have been writting script for onboarding and I have faced some issue, involving ImmutableID. the ImmutableID is the unique identifier create by your directory synchronization. it s a conversion of the ObjectGUID Attribute of your object.

So please find how to calculate the immutableID  based:

First I you have to retreive the Object GUID using :

$User = Get-ADuser $UserSamAccount -Properties * -server $DC

$ImmutableID = [system.convert]::ToBase64String(([GUID]($User.ObjectGUID)).tobytearray())

 

 

Author: John

I m a consultant who love Microsoft Exchange and try to learn as much as possible. so if you have any question related to Exchange please do not hesitate to ask. if I don't know I will know.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s