您的位置:首页 > 其它

Office 365之MsolUser用户密码永不过期(适用于Azure AD\Office 365)

2015-07-09 20:04 716 查看
今天就简单的说一下如何在O365 PowerShell 配置用户密码永不过期。
首先我们要下载一个组件,分别叫做适用于 IT 专业人员的 Microsoft Online Services 登录助手 RTW和用于 Windows PowerShell 的 Azure Active Directory 模块
适用于 IT 专业人员的 Microsoft Online Services 登录助手 RTW下载地址:https://www.microsoft.com/zh-CN/download/details.aspx?id=39267
用于 Windows PowerShell 的 Azure Active Directory 模块下载地址:http://go.microsoft.com/fwlink/p/?linkid=236297
PS:自 2014 年 10 月 20 日起,用于 Windows PowerShell 的 Azure Active Directory 模块(32 位版本)正式停用,将来对 Azure Active Directory 模块发布的更新只适用于 64 位版本。
1.先安装组件;






2.点击用于 Windows PowerShell 的 Azure Active Directory 模块;



3.连接O365,在powershell输入Connect-MsolService,并输入O365 管理员账号和密码(如果是Azure AD,就连接Azure AD管理员);



4.查看要配置用户的属性;
输入:get-MsolUser –UserPrincipalName xxxx@xxx.com | select user*,password*,可以看到该用户没用启动密码永不过期的;



5.配置并启动用户密码永不过期;
输入:set-MsolUser –UserPrincipalName xxx@xxx.com –PasswordNeverExpires $true



查看用户是否启动密码永不过期;



6.如果要为O365组织中的所有用户将密码设置为从不过期;
输入:Get-MsolUser | Set-MsolUser -PasswordNeverExpires $true
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  office;365;powershel