Microsoft 365 PowerShellでのユーザー操作 備忘録

スポンサーリンク
Microsofrt365
スポンサーリンク

■Microsoft365に接続

connect-msolservice



■ユーザーの「姓」「名」を出力

get-msoluser -UserPrincipalName test@contoso.onmicrosoft.com | select LastName,FirstName



■ユーザーの削除

Remove-msoluser -UserPrincipalName test@contoso.onmicrosoft.com


■Windows PowerShell コマンドでの既存ユーザーへのパスワード再設定手順




■PowerShell を使用して Microsoft 365 ユーザーアカウントを作成する





■[PowerShell] Office 365 へのユーザー登録時に複数ライセンスを付与する





■Windows PowerShell コマンドでの新規ユーザー一括作成手順 (ライセンス付与、パスワード同時設定)




■PowerShell を使用してユーザーアカウントから Microsoft 365 ライセンスを削除する

set-MsolUserLicense -UserPrincipalName test@contoso.onmicrosoft.com -RemoveLicenses "AccountSkuId"



■単ユーザーの表示名の変更

set-MsolUser -UserPrincipalName test@contoso.onmicrosoft.com -DisplayName "表示名"



■単ユーザーにライセンス割り当て(UsageLocationの設定が必要)

set-MsolUserLicense -UserPrincipalName test@contoso.onmicrosoft.com -AddLicenses "AccountSkuId"



コメント