Install-Module -Name MSOnline Connect-MsolService $username = "username" (get-msoluser -UserPrincipalName $username | select -expand objectID).guid | %{Set-MsolUser -ObjectId $_ -PasswordNeverExpires $true}
These are just random notes and programs that may have incomplete descriptions. Any scripts or programs use at your risk