13 January 2017

Sign into Office 365 | PowerShell

The following commands are used to sign into the PowerShell side of Office 365.  This is mainly for my use as I have to keep Googling where to find it.

$UserCredential = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Import-PSSession $Session

If you need to use the MSOL commands, you will need to sign into that too, which you can use the following command:

Connect-MsolService -Credential $UserCredential

2 comments:

  1. These PowerShell commands are essential for signing into Office 365, especially for managing Exchange Online. It's crucial to keep these steps handy, as they streamline the process of accessing administrative tools. If you’re studying IT or cybersecurity and feel overwhelmed by such technical details, consider seeking assignment help in Sydney. Professional services can provide you with guidance on PowerShell scripting, ensuring you grasp these concepts effectively. This support can enhance your understanding and boost your confidence in handling real-world IT tasks, making your academic journey smoother.

    ReplyDelete
  2. Thank you for the excellent guide about logging into Office 365 using PowerShell. It's amazing how much easier account management gets with the proper commands. By the way, while solving problems, I was looking online for winter needs and came upon a lovely leather duster coat—ideal for the season! Multitasking at its finest. Keep up the excellent work on these tutorials; they are extremely user-friendly.

    ReplyDelete