Response Group Holiday Sets for New Zealand – 2017

#EDIT Below variables to match your environment
#######################################################
##Variables
$ServiceId = “service:UCFE01.ad.ucsorted.com” ##can be obtained from Get-CsService -ApplicationServer
$HolidaySets = @($NationalPublicHolidays, $AucklandAnniversary) #holiday sets to apply to the Workflows(comma seperated)
$RGSWorkflowName = “AKL Test” #Response group workflow to apply holiday to (can be obtained with Get-CsRgsWorkflow |ft name) 

##CREATE HOLIDAYS
#National public holidays
$a = New-CsRgsHoliday -StartDate “01/01/2017 12:00 AM” -EndDate “02/01/2017 12:00 AM” -Name “2017 NZ New Years”
$b = New-CsRgsHoliday -StartDate “02/01/2017 12:00 AM” -EndDate “03/01/2017 12:00 AM” -Name “2017 NZ Day after New Years”
$c = New-CsRgsHoliday -StartDate “06/02/2017 12:00 AM” -EndDate “07/02/2017 12:00 AM” -Name “2017 NZ Waitangi Day”
$d = New-CsRgsHoliday -StartDate “14/04/2017 12:00 AM” -EndDate “15/04/2017 12:00 AM” -Name “2017 NZ Good Friday”
$e = New-CsRgsHoliday -StartDate “17/04/2017 12:00 AM” -EndDate “18/04/2017 12:00 AM” -Name “2017 NZ Easter Monday”
$f = New-CsRgsHoliday -StartDate “25/04/2017 12:00 AM” -EndDate “26/04/2017 12:00 AM” -Name “2017 NZ ANZAC Day”
$g = New-CsRgsHoliday -StartDate “05/06/2017 12:00 AM” -EndDate “06/06/2017 12:00 AM” -Name “2017 NZ Queens Birthday”
$h = New-CsRgsHoliday -StartDate “23/10/2017 12:00 AM” -EndDate “24/10/2017 12:00 AM” -Name “2017 NZ Labour Day”
$i = New-CsRgsHoliday -StartDate “25/12/2017 12:00 AM” -EndDate “26/12/2017 12:00 AM” -Name “2017 NZ Christmas Day”
$j = New-CsRgsHoliday -StartDate “26/12/2017 12:00 AM” -EndDate “27/12/2017 12:00 AM” -Name “2017 NZ Boxing Day”

#Regional public holidays
$Wellington = New-CsRgsHoliday -StartDate “23/01/2017 12:00 AM” -EndDate “24/01/2017 12:00 AM” -Name “2017 NZ Wellington Anniversary”
$Auckland = New-CsRgsHoliday -StartDate “30/01/2017 12:00 AM” -EndDate “31/01/2017 12:00 AM” -Name “2017 NZ Auckland Anniversary”
$Nelson = New-CsRgsHoliday -StartDate “30/01/2017 12:00 AM” -EndDate “31/01/2017 12:00 AM” -Name “2017 NZ Nelson Anniversary”
$Taranaki = New-CsRgsHoliday -StartDate “13/03/2017 12:00 AM” -EndDate “14/03/2017 12:00 AM” -Name “2017 NZ Taranaki Anniversary”
$Otago = New-CsRgsHoliday -StartDate “20/03/2017 12:00 AM” -EndDate “21/03/2017 12:00 AM” -Name “2017 NZ Otago Anniversary”
$Southland = New-CsRgsHoliday -StartDate “18/04/2017 12:00 AM” -EndDate “19/04/2017 12:00 AM” -Name “2017 NZ Southland Anniversary”
$CanterburySouth = New-CsRgsHoliday -StartDate “25/09/2017 12:00 AM” -EndDate “26/09/2017 12:00 AM” -Name “2017 NZ CanterburySouth Anniversary”
$HawkesBay = New-CsRgsHoliday -StartDate “20/10/2017 12:00 AM” -EndDate “21/10/2017 12:00 AM” -Name “2017 NZ HawkesBay Anniversary”
$Marlborough = New-CsRgsHoliday -StartDate “30/10/2017 12:00 AM” -EndDate “31/10/2017 12:00 AM” -Name “2017 NZ Marlborough Anniversary”
$Cantebury = New-CsRgsHoliday -StartDate “17/11/2017 12:00 AM” -EndDate “17/11/2017 12:00 AM” -Name “2017 NZ Canterbury Anniversary”
$ChathamIslands = New-CsRgsHoliday -StartDate “27/11/2017 12:00 AM” -EndDate “27/11/2017 12:00 AM” -Name “2017 NZ ChathamIslands Anniversary”
$Westland = New-CsRgsHoliday -StartDate “04/12/2017 12:00 AM” -EndDate “05/12/2017 12:00 AM” -Name “2017 NZ Westland Anniversary”

#Create national public holiday date sets
$NationalPublicHolidays = New-CsRgsHolidaySet -Parent $ServiceId -Name “2017 NZ Holidays” -HolidayList ($a, $b, $c, $d, $e, $f, $g, $h, $i, $j)

#Create regional public holiday date sets
$AucklandAnniversary = New-CsRgsHolidaySet -Parent $ServiceId -Name “2017 NZ Auckland Anniversary Day” -HolidayList ($Auckland)
$TaranakiAnniversary = New-CsRgsHolidaySet -Parent

Posted in PS, RGS, Scripts, Uncategorized | Tagged , | Leave a comment

WAC Server PreRequisites

Windows 2012 R2

Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices

Posted in Uncategorized | Leave a comment

Populate AD Telehone Number from Skype LineURI

Often I need to populate the AD Telephone Number from the LineURI. Although there are a number of blogs describing this process, if you know me..keep it simple, right?

So here is my KISS (Keep It Simple Stupid) method:-

# Collect LineURI for Users
$LineURIUsers = Get-Csuser -Filter { LineURI -ne $Null } | Select-Object LineURI, SamAccountName
foreach ($user in $LineURIUsers)
{
$LineURI = $user.LineUri
# Format the Line URI to something more acceptable in AD. Removing the Tel: (and other variants of this) and replacing ;ext= with a x
$LineURI = $LineURI.trim(“tel:”)
$LineURI = $LineURI.trim(“TEL:”)
$LineURI = $LineURI.trim(“Tel:”)
$LineURI = $LineURI -replace “;ext=”, ” x
#Set the AD Telephone Number from the results above
Write-Host “Setting Telephone Number for user “ $user.SamAccountName “to “ $LineURI
Set-ADUser $user.SamAccountName -OfficePhone $LineURI;
}
$count = $LineURIUsers | Measure-Object | Select-Object -expand count
Write-Host “`n”
Write-Host “A total of “ $count “AD Users have been updated”
$NoLineURIUsers = Get-Csuser -Filter { EnterpriseVoiceEnabled -eq $true -and LineURI -eq $Null } | Select-Object SamAccountName
$count = $NoLineURIUsers | Measure-Object | Select-Object -expand count
Write-Host “`n”
Write-Host “A total of” $count “AD Users do not have a LineURI set,but are Enterprise Voice Enabled”
Write-Host “`n”
Write-Host “These are as follows:- `n”
foreach ($user in $NoLineURIUsers)
{
Write-Host $user.SamAccountName
}

Posted in Uncategorized | Leave a comment

SCRIPT: Enable Skype for Business users for Hosted UM

This script gets all the users that are Enterprise Voice Enabled. It then feeds the SIP address of each of these users to the foreach loop, effectively granting the HostedVoiceMailPolicy and setting HostedVoiceMail to True

#Variables
$hostedVMPolicy =CloudUM” #rename to match your HostedVoiceMailPolicy
$userlist = get-csuser | where{ $_.enterprisevoiceenabled -eq “true” }
foreach ($user in $userlist)
{
Write-Host “Granting Hosted VoiceMail Policy to” $user.sipaddress
Grant-CsHostedVoicemailPolicy $user.sipaddress -policyname $hostedVMPolicy
set-csuser $user.sipaddress -HostedVoiceMail $true
}

Posted in Scripts | Tagged | Leave a comment

Find All Assigned Numbers

Find All Assigned Numbers

Get-CsUser -Filter {LineURI -ne $Null}
Get-CsUser -Filter {PrivateLine -ne $Null}
Get-CsAnalogDevice -Filter {LineURI -ne $Null}
Get-CsCommonAreaPhone -Filter {LineURI -ne $Null}
Get-CsExUmContact -Filter {LineURI -ne $Null}
Get-CsDialInConferencingAccessNumber -Filter {LineURI -ne $Null}
Get-CsTrustedApplicationEndpoint -Filter {LineURI -ne $Null}
Get-CsRgsWorkflow
Get-CsMeetingRoom -Filter {LineURI -ne $Null}

Posted in Find All Assigned Numbers | 1 Comment

Find a specific TelURI assignment

At times you may lose track of who has been assigned which Tel URI. Although its easy enough to grab a csv of all csusers or even dump to an html file, that is a larger hammer than is required.

A simple Lync Management Shell Script does the job:

Get-CsUser | where {$_.LineURI -eq “tel:+649xxxxxxx” -or $_.PrivateLine -eq “tel:+649xxxxxxx“} | format-table -property DisplayName,LineURI,PrivateLine

The result:

Granted you can search and filter from Lync Control Panel for Tel Uri, there is no way of finding Private Line URI’s from the Control Panel

Posted in Find a specific TelURI assignment, LincURI, Powershell, PS, Search, TelURI | 1 Comment

Switching RGS Audio files

This script was created to allow a customer to quickly change the audio file (MOH) used by the RGS workflow. The idea was for an IT Service Desk that would announce known outages etc by means of their queue music. They would have a list of pre-recorded audio files and by means of the script simply select the file they wanted to use. OF course the use case can be anything really, sales specials, marketing pitch etc.

Download

Posted in Audio Files, RGS | Leave a comment