【发布时间】:2020-04-01 20:56:57
【问题描述】:
目前我有这个脚本:
$SiteURL="https://contoso.sharepoint.com/sites/contoso"
$UserID="j.doe@contoso.nl"
#Get Credentials to connect
$Cred = Get-Credential
#Connect to SharePoint Online Admin Site
Connect-SPOService -Url $AdminSiteURL -Credential $cred
#sharepoint online powershell remove user permissions from site collection
Get-SPOUser -Site $SiteURL -LoginName $UserID
但我有多个网站集,它需要在其中找到该用户:
https://contoso.sharepoint.com/sites/Projecten
https://contoso.sharepoint.com/sites/PFO
如何使用for 循环执行此操作,以便在每个网站集中找到用户?
【问题讨论】:
标签: powershell sharepoint