获取网站集的Webid [英] get webid of site collection

查看:78
本文介绍了获取网站集的Webid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

Hi Guys,

 

我正在使用下面的代码使用下面的代码来获取网站集列表的Web ID.问题是,我总是会获得第一个网站集的GUID,而其他Webinfo(如Title,Url等)却是如此.是正确的.谁能建议我这里出了什么问题?

I am using below code to get web Id of list of site collections using code below. The issue is i always get GUID of the first site collection howerver the other webinfo like Title, Url,etc. is correct. can anyone suggest me what is going wrong here:

foreach($ data中的$ row)
{

foreach ($row in $data)
{

Connect-PnPOnline -Url $ row.Url -Credentials $ creds
$ web = Get-PnPWeb

Connect-PnPOnline -Url $row.Url -Credentials $creds
$web=Get-PnPWeb

写主机" web:" + $ web.id

write-host "web: " + $web.id

}

推荐答案

foreach(


Get-SPSite -Limit中的站点全部) { 写主机
site in Get-SPSite -Limit ALL) { Write-host


site.Url 写主机
site.Url Write-host


这篇关于获取网站集的Webid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆