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 } } } } } }
查看全文
相关阅读:
day04-交互、格式化输出及基本运算符
day03-执行python方式、变量及数据类型简介
day02-操作系统、编程语言分类及python安装
day01-编程与计算机组成原理
Appium测试环境搭建实践
Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(3)
Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(2)
Windows环境下多线程编程原理与应用读书笔记(3)————Windows环境中的多线程实现(1)
Windows环境下多线程编程原理与应用读书笔记(2)————面向对象技术
Windows环境下多线程编程原理与应用读书笔记(1)————基本概念
原文地址:https://www.cnblogs.com/mingle/p/2308201.html
最新文章
线段树模板讲解
操作系统相关知识
操作系统
计算机的介绍
SQL server 链接查询
SQL servcer 时间日期函数、数据类型转换
jQuery HTML节点元素修改、追加的方法 html()、append()、prepend()、
python (列表,元组)
python (字符串常用方法)
python while循环,格式化输出
热门文章
python发展史
Python: 使用zipfile+io模块在内存中进行zip操作
Python: 设计模式 之 工厂模式例(2)(神奇的Python)
Python: 设计模式 之 工厂模式例(1)
Python: tkinter实例改名小工具
[Noip2016]愤怒的小鸟(状压DP)
[Noip2016]组合数(数论)
[jzoj 5230] 队伍统计(状压DP)
day05-控制流程之if/while/for
5.21leetcode练习
Copyright © 2011-2022 走看看