On this occasion I needed to set a user password so that it never expires…thankyou to Jorge Diaz
connect-MSOLservice -Credential $cred
Set-MSOLUser –UserPrincipalName firstname.lastname@example.org –PasswordNeverExpires $true
The first 2 lines here are just settimg you office365 credentials (as in previous examples). The 3rd line is where all the magic happens.