Created
July 17, 2019 23:13
-
-
Save tostka/2b11f73c97bbe66ac88ef0ad010f4e80 to your computer and use it in GitHub Desktop.
Wait for AD object to replicate to AzureAD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# AAD replication dawdle loop: | |
# 1-line, note, the get-msoluser cmdlet lacks an erroraction param, which causes it to error every pass. But the code plows on until object is returned replicated | |
Do { write-host "." -NoNewLine; $msolu = get-MsolUser -UserPrincipalName $adu.userprincipalname ; start-sleep -s 30 ; } Until($msolu) ; write-host "`a" ; write-host "`a" ; write-host "`a" ; $msolu | format-list userprin*, *Error*, *status*, softdel*, lic*, islic* ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment