Got tired of typing it all manually. The script is at the bottom of the post. Read the instructions.
Run lastest Powershell on the machine (v5 right now).
Microsoft .NET Framework 4.5.x and then either the Windows Management Framework 3.0 or the Windows Management Framework 4.0. Links below.
You need to use a 64-bit version of Windows because of the requirements for the Skype for Business Online module and one of the Office 365 modules.
Run this scipt in Powershell ISE, works better.
1. Check which version of powershell you have
$PSVersionTable.PSVersion | Format-List
If its 5 or higher – you are good to go. If not, download the lastest powershell package (google it).
2. Run Powershell (right click – run as admin)
3. Install the following packages:
Latest Powershell (in case you didn’t install it – google it)
.Net framework 4.5 (or higher)
Windows management framework 4.0 (or higher)
Microsoft Online Service Sign-in Assistant for IT Professionals RTW
Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
SharePoint Online Management Shell
Skype for Business Online, Windows PowerShell Module
4. Reboot your machine (just because)
5. Start “Powershell ISE” – load the script. Press Play/Start.
6. Good to know about the script:
The quit command is to disconnect SHP/Exchange. If you are not connected to any of those services it will throw an error – but no biggie. Just close the window.
Type “mainmenu” after having done a selection to get back to the mainmenu.
Do what you want with the script.
—Powershell Script. Copy this and save it in a file as “loginscript.ps1”.