Connecting and verifying connections to Office356 in a script

I have a script that creates users in my local directory and then sleeps for ~20 minutes to allow dirsysnc to create the user objects for me; once it wakes up again it assigns the licenses and add the new user objects to some groups based on their disposition.

I have had problems with mis-keying my password and having the session time out while sleeping – anyone have a sample script that test that the password is good before continuing AND / OR tests the connection to O365 before excuting phase two of the script?

submitted by /u/fuzzydamnit
[link] [comments]

Leave a Reply