Remote PowerShell login
SkypeForBusiness
SharePoint
Exchange
Security
Logout
Run the following cmdlet to set the user password to never expire
Requisites login into Office 365 Skype for Business Online are:
· Running OS must be 64bit
· Microsoft .NET Framework 4.5.x
· PowerShell Version 3.0 or higher
(if you need to install Version 3.0+, download and install Windows Management Framework 4.0: https://www.microsoft.com/en-us/download/details.aspx?id=40855)
(if you need to install Version 3.0+, download and install Windows Management Framework 4.0: https://www.microsoft.com/en-us/download/details.aspx?id=40855)
- You need to install the modules that are required for Office 365, SharePoint Online, and Skype for Business Online:
- Microsoft Online Service Sign-in Assistant for IT Professionals RTW
- Windows Azure Active Directory Module for Windows PowerShell (64-bit version)
- Download the Windows PowerShell module for Skype for Business Online
MicrosoftOnlineLogin
Set-ExecutionPolicy RemoteSigned
$credential = Get-Credential
Connect-MsolService -Credential $credential
Connect-MsolService -Credential $credential
Import-Module SkypeOnlineConnector
$SfBoSession = New-CsOnlineSession -Credential $credential
Import-PSSession $SfBoSession
$SfBoSession = New-CsOnlineSession -Credential $credential
Import-PSSession $SfBoSession
Import-Module Microsoft.Online.SharePoint.PowerShell -DisableNameChecking
Connect-SPOService -Url https://domainhost-admin.sharepoint.com -credential $credential
Connect-SPOService -Url https://domainhost-admin.sharepoint.com -credential $credential
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking
Import-PSSession $exchangeSession -DisableNameChecking
$ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $credential -Authentication Basic -AllowRedirection
Import-PSSession $ccSession -Prefix cc
Import-PSSession $ccSession -Prefix cc
Remove-PSSession $sfboSession
Remove-PSSession $exchangeSession
Remove-PSSession $ccSession
Disconnect-SPOService
Remove-PSSession $exchangeSession
Remove-PSSession $ccSession
Disconnect-SPOService
Set a user's password to never expire
I strongly urge you, that your admin user have the password set to never expire!
Run the following cmdlet to set the user password to never expire
1. Connect to Windows PowerShell by using your company admin credentials. Run the following cmdlet:
Connect-MsolService
Connect-MsolService
2. In the Enter Credentials page, enter your Office 365 global admin credentials.
3. After you enter your Office 365 credentials, do the following:
o To set the password of one user to never expire, run the following cmdlet:
Set-MsolUser -UserPrincipalName <serviceaccount@contoso.com> -PasswordNeverExpires $true
Set-MsolUser -UserPrincipalName <serviceaccount@contoso.com> -PasswordNeverExpires $true
Find out whether a user's password is set to never expire
1. Connect to Windows PowerShell by using your company admin credentials. Run the following cmdlet:
Connect-MsolService
Connect-MsolService
2. Do the following:
o To see whether a single user’s password is set to never expire, run the following cmdlet by using the user principal name (UPN) (for example, april@contoso.onmicrosoft.com) or the user ID of the user you want to check:
Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires
Author: Thomas Poett MVP, Business Unit Lead Microsoft Unified Communication
Get-MSOLUser -UserPrincipalName <user ID> | Select PasswordNeverExpires
Author: Thomas Poett MVP, Business Unit Lead Microsoft Unified Communication