Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/sharepoint/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
获取sharepoint场中的所有计算机_Sharepoint_Powershell_Sharepoint 2010_Powershell 2.0_Sharepoint Api - Fatal编程技术网

获取sharepoint场中的所有计算机

获取sharepoint场中的所有计算机,sharepoint,powershell,sharepoint-2010,powershell-2.0,sharepoint-api,Sharepoint,Powershell,Sharepoint 2010,Powershell 2.0,Sharepoint Api,我正在写一个非常大的脚本,它将获得很多关于农场的信息 我想动态创建它,所以我想: 1.获取sharepoint场中的所有数据库服务器 2.我想得到农场里所有的sharepoint机器 问题是我们的 获取SPServer 我把所有的服务器都搞混了,还有smtp服务器 和 获取SPDatabase |选择NormalizedDataSource 我多次收到它们 请帮助如果获取SPDatabase |选择NormalizedDataSource返回所有数据库,您可以使用-Unique开关过滤结果: G

我正在写一个非常大的脚本,它将获得很多关于农场的信息 我想动态创建它,所以我想:
1.获取sharepoint场中的所有数据库服务器 2.我想得到农场里所有的sharepoint机器

问题是我们的

获取SPServer

我把所有的服务器都搞混了,还有smtp服务器 和

获取SPDatabase |选择NormalizedDataSource

我多次收到它们


请帮助

如果
获取SPDatabase |选择NormalizedDataSource
返回所有数据库,您可以使用
-Unique
开关过滤结果:

Get-SPDatabase | Select NormalizedDataSource -unique
通过按角色筛选,可以获取所有SP应用程序服务器:

get-spserver | ? { $_.Role -eq "Application" }

您希望对象从
获取SPSServer
的顺序是什么?我不在乎。你知道如何解析它们吗?听起来你想做的是对
getspserver
返回的对象进行排序,并可能过滤掉一些对象。要按对象属性排序,可以使用
sort-Ojbect
cmdlet,要筛选出特定对象,可以使用
Where-object
cmdlet。