Taylohtio/_Scripts/EnumCustomAlertTemplates/EnumCustomAlertTemplates.ps1

18 lines
607 B
PowerShell

$svc = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$col = New-Object -TypeName Microsoft.SharePoint.SPAlertTemplateCollection -ArgumentList $svc
foreach($a in $col)
{
if ($a.Properties["Custom"] -eq $null)
{
continue
}
"=======================================================================" | Out-File log.txt -Append
$a.Properties["FriendlyName"] | Out-File log.txt -Append
if (![System.String]::IsNullOrEmpty($a.Properties["NotificationMessage"]))
{
$a.Properties["NotificationMessage"] | Out-File log.txt -Append
}
}