Office 365 IT Professional——利用PowerShell更改Password 永不过期时间和提醒时间
2015-08-24 16:10
821 查看
很多IT背景的管理员,习惯于利用PowerShell的方式管理Office365平台,那么利用PowerShell如何更改PasswordExpiration Policy呢?具体的命令如下:
Set-MsolPasswordPolicy-DomainName “domainname” –ValidityPeriod “numberofdays” -NotificationDays“numberofdays”
举例说明:将其密码策略设置Days Before PasswordExpire:365;Daysbefore a user is notified that their password will expire:7,具体步骤如下:
1. 用Administrator打开Azure ActiveDirectory Module for Windows PowerShell这个工具,输入如下命令,链接Online Service:
import-modulemsonline
$cred=get-credential
Connect-msolservice–credential $cred
2. 根据需求,输入如下命令:
Set-MsolPasswordPolicy-DomainName “AvePointCC.OnMicrosoft.com” –ValidityPeriod “365”-NotificationDays “7”
3. 登录Office 365 Admin Center页面,展开 Service Setting,点击“Password”,查看密码策略是否与修改的结果一致,即:Days Before Password Expire:365;Days before a user isnotified that their password will expire:7
Set-MsolPasswordPolicy-DomainName “domainname” –ValidityPeriod “numberofdays” -NotificationDays“numberofdays”
举例说明:将其密码策略设置Days Before PasswordExpire:365;Daysbefore a user is notified that their password will expire:7,具体步骤如下:
1. 用Administrator打开Azure ActiveDirectory Module for Windows PowerShell这个工具,输入如下命令,链接Online Service:
import-modulemsonline
$cred=get-credential
Connect-msolservice–credential $cred
2. 根据需求,输入如下命令:
Set-MsolPasswordPolicy-DomainName “AvePointCC.OnMicrosoft.com” –ValidityPeriod “365”-NotificationDays “7”
3. 登录Office 365 Admin Center页面,展开 Service Setting,点击“Password”,查看密码策略是否与修改的结果一致,即:Days Before Password Expire:365;Days before a user isnotified that their password will expire:7
相关文章推荐
- 【简单学习shell】iptables命令实用
- Shell screen的用法
- [PowerShell]template engine
- windows下git bash存储alias
- IBM developer Bash系列
- shell 使用字典
- Shell脚本查看linux系统性能瓶颈
- awk与shell之间的变量传递方法
- Linux目录结构、bash的基础特性、I/O重定向及管道
- 博客迁移:Shell脚本批量文件处理
- Bash shortcuts
- redhat系统使用xshell连接后无法弹出界面
- BASH find substring in string
- shell里的各种括号
- linux:bash基础
- 希尔排序(shell)
- BASH第七课第二题
- BASH第七课第一题
- 解决adb shell input text 中文输入,unicode转utf-8
- 查看linux中shell的几种方法汇总