zoukankan
html css js c++ java
深入浅出PowerShell——设置用户群组
function SetupUserGroups($site,$owners,$members,$vistors) { if($site -ne $null -and $site -ne "") { $web = $site.OpenWeb() $ownerGroup = $web.AssociatedOwnerGroup $memberGroup =$web.AssociatedMemberGroup $visitorGroup = $web.AssociatedVisitorGroup $xpath = "Identity" if($owners -ne $null -and $owners -ne "") { $users = GetNodes -xmlDoc $owners -xpath $xpath foreach($user in $users) { if($user -ne $null -and $user -ne "") { if($user.InnerText -ne $null -and $user.InnerText -ne "") { New-SPUser -UserAlias $user.InnerText -Web $web -Group $ownerGroup } } } } if($members -ne $null -and $members -ne "") { $users = GetNodes -xmlDoc $members -xpath $xpath foreach($user in $users) { if($user -ne $null -and $user -ne "") { if($user.InnerText -ne $null -and $user.InnerText -ne "") { New-SPUser -UserAlias $user.InnerText -Web $web -Group $memberGroup } } } } if($vistors -ne $null -and $vistors -ne "") { $users = GetNodes -xmlDoc $vistors -xpath $xpath foreach($user in $users) { if($user -ne $null -and $user -ne "") { if($user.InnerText -ne $null -and $user.InnerText -ne "") { New-SPUser -UserAlias $user.InnerText -Web $web -Group $visitorGroup } } } } } }
查看全文
相关阅读:
Day2----Python常用模块
Day1--Python基础知识
AES加密
MOS管基本MOS管基本认识(快速入门)认识(快速入门)
printf定义宏方便调试
ESP8266上电透传与手动透传AT指令设置笔记
三态门与高阻态
步进电机原理
关于stm32 MCU申请动态内存malloc的认识
高低位数据分离的两种方法
原文地址:https://www.cnblogs.com/mingle/p/2308201.html
最新文章
IO流,对象序列化
IO流 Java文件处理,输入与输出
配置Spring Boot 跨域后PUT,DELETE方法出现403Forbidden
java常用类 比较器/system/math/big
java常用类Time
java常用类String
多线程相关
数据库查询字段注释
Docker
Docker应用部署
热门文章
fastfdfs上传代码
zuul
Nodejs安装及Vue工程创建(nvm和npm安装和配置,cnpm安装和配置,镜像配置)
Java的动态代理
建立Spring工程及基本使用(实例)-IOC部分
建立MyBatis工程及基本使用(实例)
Day3----Python集合
Day2----Python字典
Day2----Python列表
C语言工具函数
Copyright © 2011-2022 走看看