<#
.Synopsis
List IT Policy & Procedure MetaData
.DESCRIPTION
Script used to list Information and Technology Policies and procedures
.EXAMPLE
Get-spmPolicyProcedureMetaData -WebAddress http://YourSite/PolicyProcedure
.EXAMPLE
#>
function Get-spmPolicyProcedureMetaData
{
Param
(
# Web address contianing policies and procedures
'http://yoursite/PolicyProcedure'
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$False,
Position=0)]
[string]
$WebAddress
)
Begin
{
$web = get-spweb $WebAddress
$pageLib = $web.Lists["Pages"]
}
Process
{
$PageLib.Items | %{
$page = $_
if($page["Department"] -like '*Information*'){
$pageName = "Page
Name = " + $page.Name
Write-Output $pageName
$dept = "Department
= " + $page["Department"].trimstart("23;#")
Write-OutPut $dept
$eff = "EFF
Date = " + $page["Published Effective Date"].trimstart("string;#")
Write-Output $eff
$cr = "Council
Resolution Number = " + $page["Council Resolution Number"]
Write-Output $cr
$desc = "Description
= " + $page["Comments"]
Write-Output $desc
Write-Output ""
}
}
}
End
{
$web.Dispose()
}
}
PS C:\dev> . . /filename.ps1
PS C:\dev> Get-spmPolicyProcedure -webaddress http://yoursite/yourweb