This is a very simple PowerShell script to export your Lync/Skype for Business holiday sets in Response Groups.
The script will parse your pool name (assuming there is only one), and will export each holiday set as a separate .csv file in the root of your C: drive.
$pool = "Service:"+(Get-CsPool | Where-Object {$_.Services -match "Registrar:"}).identity
$HolidaySet = Get-CsRGSHolidaySet
$Name = $HolidaySet.Name
cls
foreach ($n in $HolidaySet)
{
Write-Host "Processing holiday set called $($n.name)" -foregroundcolor White
Get-CsRgsHolidaySet -Identity $pool -Name $n.name | Select-Object Identity -ExpandProperty holidaylist | Export-csv c:\$($n.name).csv
}
No comments:
Post a Comment