无法获取Webaplication的网站集 [英] Unable to get site collection of Webaplication
本文介绍了无法获取Webaplication的网站集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的
我正在尝试使用以下代码获取Web应用程序的网站集,但对于以下代码,我却报错了:
I am trying to get site collection of web-application with below code ,But I am getting error for below code as Cannot bind parameter 'Identity'. Cannot convert value of type "Selected.Microsoft.SharePoint.Administration.SPWebApplication" to type "Microsoft.SharePoint.PowerShell.SPSitePipeBind"
Error Line :$sc = Get-SPSite -limit all -webapplication $app
Add-PSSnapin Microsoft.SharePoint.PowerShell
$mywebapps=Get-SPWebApplication | Select-Object -Property Name, Url, Status, @{n="Farm";e={$_.Farm.Name}}
foreach($app in $mywebapps)
{
$sc = Get-SPSite -limit all -webapplication $app
foreach($collection in $sc)
{
write-host $collection
}
}
谢谢,质量沟通可提供SAM的高质量工作.
Thanks, Quality Communication Provides Quality Work, SAM.
推荐答案
sc = Get-SPSite -limit all -webapplication
sc = Get-SPSite -limit all -webapplication
app.URL
也不需要选择tbh
Also there isn't a need for the select tbh
这篇关于无法获取Webaplication的网站集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文