Working on a script to get Mobile info from users on Office 365. MS throttles the session and script errors out before finishing (MS closes the remote session).
I get all users on an array $mobile=Get-MobileDevice; Foreach ($phone in $mobile) {getsomeinfo}
Any idea how can i run this script for 1000 users than Close and Reopen a session with 365 and continue where i left ?
Basically run the script on groups of users but track the users that are already processed.