您的位置:首页 > 运维架构 > Shell

powershell 1.2 windows-server

2016-02-27 16:56 537 查看

CML

查看pwershell是否开启脚本功能

Get-ExecutionPolicy


开启脚本功能

Set-ExecutionPolicy unrestricted


获取server-manager模块

import-module servermanager


获取服务器角色功能列表

Get-windowFeature


添加角色/功能

add-windowsFeature name -whatif
(whatif用于虚拟运行)

add-windowsFeature name -restart
(添加完自动重启)

删除角色/功能

remove-windowsFeature name -whatif
(虚拟运行)

remove-windowsFeature name -restart
(删除后自动重启)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: