Jump to content
Software FX Community

akkmuthu

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by akkmuthu

  1. 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

     

  2. 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

×
×
  • Create New...