akkmuthu
-
Posts
4 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Posts posted by akkmuthu
-
-
Hi,
It is Collection of Sites and properites. I want only some selected fields from that. If I remove "Format-table", it will return all the properties
-
My script :
# Assembly References[void][system.Reflection.Assembly]::LoadWithPartialName("System") [void][system.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
# *****************************************************************************# Function: Get-SiteCollection # Description: Populates all the site details of a webfarm.# Parameters: None # *****************************************************************************function Get-SiteCollection() { # Getting Content Service of current web farm $oContentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService;
# Getting all the web applications as collection [Microsoft.SharePoint.Administration.SPWebApplicationCollection]$SPWebAppCollection = $oContentService.WebApplications;
$SPWebAppCollection| Format-Table -autosize -property Name}
#Calling main function Get-SiteCollection
-
I have powerShell script to get collection of sites and foramting the collection by using Format-table
If I run using PowerShell, working fine. The same thing is working when I give "Test" from PowerGadgets".
But after giving finish am getting " No Data Available" screen.
My script :
============= [Microsoft.SharePoint.Administration.SPWebApplicationCollection]$SPWebAppCollection = $oContentService.WebApplications;
$SPWebAppCollection| Format-Table -autosize -property Name
Please help me on this.
Thanks in advance.
-Andamuthu K
No data from "PowerGadgets"
in PowerGadgets Support
Posted
I want to use Name and version from that colection.