function LoadSharePointPowerShellEnviroment
{
write-host
write-host "Setting up Powershell enviroment for Sharepoint" -foregroundcolor Blue
Add-PSSnapin "Microsoft.Sharepoint.PowerShell" -ErrorAction SilentlyContinue
Write-host "Sharepoint PowerShell Snapin loaded." -foregroundcolor Green
}
LoadSharePointPowerShellEnviroment
$site = new-object Microsoft.SharePoint.SPSite("http://ssrap7:88")
$spWeb = $site.OpenWeb("ETSforSuccess")
$spFile = $spWeb.GetFile("Pages/default.aspx")
$i = 0
foreach($key in $spFile.Properties.Keys)
{
write-host $i "File Key: " $key
$i +=1
}
$i = 0
foreach($val in $spFile.Properties.Values)
{
write-host $i "File value: " $val
$i +=1
}