Get-SPWebDocumentProperties


posted by Richard Giles
10-06-2008

Downloads: 399
File size: 1.1kB
Views: 928

Embed
Get-SPWebDocumentProperties
  1. ## ===================================================================== 
  2. ## Title       : Get-SPWebDocumentProperties 
  3. ## Description : Retrieve formatted table selected properties 
  4. ## Author      : Idera 
  5. ## Date        : 6/27/2008 
  6. ## Input       : -siteURL -listName -verbose -debug     
  7. ## Output      :  
  8. ## Usage            : PS> . Get-SPWebDocumentProperties -siteURL http://localhost -listName Tasks -v -d 
  9. ## Notes            :  
  10. ## Tag            : PowerShell, Sharepoint 
  11. ## ===================================================================== 
  12.  
  13. param 
  14.       [string]$siteURL = "http://localhost"
  15.     [string]$docsName = "Shared Documents"
  16.     [switch]$verbose
  17.     [switch]$debug 
  18.  
  19. function main() 
  20.     if ($verbose) {$VerbosePreference = "Continue"
  21.     if ($debug) {$DebugPreference = "Continue"
  22.     Get-SPWebDocumentProperties -siteURL $siteURL -docsName $docsName 
  23.  
  24. function Get-SPWebDocumentProperties($siteURL, $docsName
  25.     [System.Reflection.Assembly]::LoadWithPartialName(�Microsoft.SharePoint�) 
  26.     $mysite = New-Object Microsoft.Sharepoint.SPSite($siteURL
  27.     $web = $mysite.OpenWeb() 
  28.     $web.GetFolder($docsName
  29.  
  30. main 
Filed under: ,

Retrieve formatted table of selected properties for documents from Sharepoint.

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.