Updated Automatic Australian RGS/Response Groups Holiday Sets v.2.20

%3CLINGO-SUB%20id%3D%22lingo-sub-192630%22%20slang%3D%22en-US%22%3EUpdated%20Automatic%20Australian%20RGS%2FResponse%20Groups%20Holiday%20Sets%20v.2.20%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-192630%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%26nbsp%3B19%2F05%2F2018%20Released%20Version%202.2%20to%20fix%20an%20issue%20with%20multiple%20pool%20selection%2C%20typos%20and%20even%20cleaning%20up%20my%20code%20with%20ISESteriods%3C%2FP%3E%3CH2%20id%3D%22toc-hId-1624329129%22%20id%3D%22toc-hId-1791690257%22%3EAbout%26nbsp%3Bthe%20tool%3C%2FH2%3E%3CP%3EFor%20those%20that%20don't%20know%2C%20I've%20been%20writing%20and%20maintaining%20this%20script%20for%20a%20few%20years%20over%20on%20%3CA%20href%3D%22https%3A%2F%2Fgallery.technet.microsoft.com%2FAustralian-RGSResponse-22845230%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3ETechNet%20%3C%2FA%3EThis%20is%20a%20script%20that%20adds%2Fmaintains%20the%20relevant%20Australian%20Holidays%20to%20your%20Skype4B%20%26nbsp%3B%2F%20Lync%20environment%20for%20the%20next%2012%20months%20based%20on%20data%20available%20from%20the%20Australian%20Government%20Website.%3C%2FP%3E%3CP%3EI%20re-wrote%20most%20of%20the%20script%20from%20scratch%20and%20added%20a%20whole%20bunch%20of%20code%20to%20try%20and%20catch%20a%20lot%20of%20the%20errors%20etc%20that%20happened%20in%20the%20older%20versions.%26nbsp%3BI%E2%80%99ve%20also%20tried%20to%20make%20it%20alot%20simpler%20to%20use%20for%20everyone%20that%E2%80%99s%20not%20me.%26nbsp%3B%3C%2FP%3E%3CP%3EData%20is%20taken%20from%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.australia.gov.au%2Fabout-australia%2Fspecial-dates-and-events%2Fpublic-holidays%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fwww.australia.gov.au%2Fabout-australia%2Fspecial-dates-and-events%2Fpublic-holidays%3C%2FA%3E%26nbsp%3Band%20I%20have%20done%20my%20best%20to%20be%20as%20error%20free%20as%20possible.%3C%2FP%3E%3CP%3EShout%20of%20to%26nbsp%3B%3CA%20href%3D%22http%3A%2F%2Fwww.greiginsydney.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGreig%20in%20Sydney%3C%2FA%3E%26nbsp%3Bfor%20beta%20testing%20and%20providing%20the%20red%20pen.%20That%20guy%20would%20have%20made%20a%20brilliant%20English%20teacher.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CH2%20id%3D%22toc-hId--927827832%22%20id%3D%22toc-hId--760466704%22%3EInstructions%3C%2FH2%3E%3CP%3EDownload%2C%20and%20run%20on%20a%20Frontend%20or%20any%20machine%20with%20the%20Lync%20%2F%20Skype4B%20management%20tools%20installed%3C%2FP%3E%3CP%3EThe%20script%20will%20attempt%20to%20detect%20your%20Skype4B%20Setup%20and%20proceed%20accordingly%3C%2FP%3E%3CUL%3E%3CLI%3EIf%20it%20only%20detects%20a%20single%20FrontEnd%20it%20will%20prompt%20you%20to%20confirm%20the%20selected%20pool%20and%20then%20configure%20new%20Holiday%20sets%3C%2FLI%3E%3CLI%3EShould%20it%20detect%20multiple%20pools%20it%20will%20ask%20you%20to%20confirm%20which%20pool%20to%20use%20and%20configure%20new%20Holiday%20sets%3C%2FLI%3E%3CLI%3EIf%20it%20finds%20Holiday%20sets%20with%20the%20same%20name%20they%20will%20automatically%20have%20any%20existing%20entries%26nbsp%3B%3CSTRONG%3Eremoved%3C%2FSTRONG%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EIf%20you%20already%20have%20holiday%20sets%20with%20the%20name%20names%20or%20you%20need%20to%20add%20a%20country%20code.%20You%20can%20specify%20a%20string%20with%20the%26nbsp%3B%3CSTRONG%3E-RGSPrepend%26nbsp%3B%3C%2FSTRONG%3Eparameter%20to%20prepend%20to%20the%20Holiday%20set%20names.%3C%2FP%3E%3CH2%20id%3D%22toc-hId-814982503%22%20id%3D%22toc-hId-982343631%22%3EUnattended%20(Scheduled%20Task)%20execution%3C%2FH2%3E%3CP%3EYou%20can%20also%20use%20the%20script%20on%20a%20scheduled%20task%20to%20automatically%20pull%20and%20update%20the%20latest%20holidays%20on%20a%20monthly%20basis%20if%20your%20server%20has%20internet%20access.%3CBR%20%2F%3ESimply%20specify%20-FrontEndPool%20%3CFEPOOLFQDN%3E%20and%20-Unattended%20in%20the%20scheduled%20task.%3C%2FFEPOOLFQDN%3E%3C%2FP%3E%3CP%3E%3CIMG%20src%3D%22http%3A%2F%2Fwww.skype4badmin.com%2Fwp-content%2Fuploads%2F2017%2F12%2Fimg_5a2c65cdb5a9d.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%3CP%3EYou%20can%20also%20still%20specify%20the%26nbsp%3B%3CSTRONG%3E-ServiceID%20and%20-Unattended%26nbsp%3B%3C%2FSTRONG%3Eparameters%20at%20the%20commandline%20if%20you%20want%20to%20specify%20the%20ServiceID%20directly.%3CBR%20%2F%3EUse%26nbsp%3B%3CEM%3E%3CSTRONG%3EGet-CsRgsConfiguration%20-Identity%20Frontend.Skype4bAdmin.com%3C%2FSTRONG%3E%3C%2FEM%3E%26nbsp%3Bto%20see%20valid%20service%20id%E2%80%99s%3C%2FP%3E%3CP%3E%3CIMG%20src%3D%22http%3A%2F%2Fwww.skype4badmin.com%2Fwp-content%2Fuploads%2F2017%2F10%2Fimg_59db5499e52a5.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%3CP%3ENote%20either%20of%20these%20options%20will%20disable%20script%20update%20checking.%20So%20it%20pays%20to%20check%20manually%20every%20now%20and%20again.%3C%2FP%3E%3CH2%20id%3D%22toc-hId--1737174458%22%20id%3D%22toc-hId--1569813330%22%3EApplying%20the%20Holiday%20sets%3C%2FH2%3E%3CP%3EAfter%20you%20have%20run%20the%20script%2C%20you%20can%20find%20the%20time%20frames%20in%20the%20Response%20Groups%20Editor%2C%20Simply%20tick%20the%20states%20you%20want%20the%20workflow%20closed%20for.%3CBR%20%2F%3E%3CSTRONG%3ENote%3C%2FSTRONG%3E%3A%20each%20of%20the%20states%20already%20includes%20the%20National%20holiday%20set%2C%20so%20there%20is%20no%20need%20to%20tick%20both.%3C%2FP%3E%3CP%3E%3CIMG%20src%3D%22http%3A%2F%2Fwww.skype4badmin.com%2Fwp-content%2Fuploads%2F2017%2F10%2Fimg_59db53b06a2fc.png%22%20border%3D%220%22%20alt%3D%22%22%20%2F%3E%3C%2FP%3E%3CH2%20id%3D%22toc-hId-5635877%22%20id%3D%22toc-hId-172997005%22%3EFork%20Me%3C%2FH2%3E%3CP%3EAs%20alot%20of%20my%20code%20is%20open%20source%2C%20I%E2%80%99ve%20moved%20from%20storing%20my%20Git%20repo%20on%20VSTS%20over%20to%20GitHub.%20Feel%20free%20to%20fork%20the%20code%20for%20your%20own%20purposes%20over%20here%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FAtreidae%2FNew-CsRgsAustralianHolidayList%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FAtreidae%2FNew-CsRgsAustralianHolidayList%3C%2FA%3E%3C%2FP%3E%3CH2%20id%3D%22toc-hId-1748446212%22%20id%3D%22toc-hId-1915807340%22%3EAdvanced%3C%2FH2%3E%3CP%3EThe%20default%20holiday%20set%20names%20are%20%E2%80%9CNational%E2%80%9D%2C%E2%80%9DVictoria%E2%80%9D%2C%E2%80%9DNew%20South%20Wales%E2%80%9D%2C%E2%80%9DQueensland%E2%80%9D%2C%E2%80%9DACT%E2%80%9D%2C%E2%80%9DNorthern%20Territory%E2%80%9D%2C%E2%80%9DSouth%20Australia%E2%80%9D%2C%E2%80%9DWestern%20Australia%E2%80%9D%2C%E2%80%9DTasmania%E2%80%9D%3CBR%20%2F%3EIf%20you%20need%20to%20change%20these%20for%20whatever%20reason%20update%20the%20following%20lines%20in%20the%20script%3C%2FP%3E%3CDIV%20class%3D%22codecolorer-container%20x_x_text%20x_x_pse-ise-dark%22%3E%3CTABLE%20cellspacing%3D%220%22%20cellpadding%3D%220%22%3E%3CTBODY%3E%3CTR%3E%3CTD%3E%3CDIV%3E1%3CBR%20%2F%3E2%3CBR%20%2F%3E3%3CBR%20%2F%3E4%3CBR%20%2F%3E5%3CBR%20%2F%3E6%3CBR%20%2F%3E7%3CBR%20%2F%3E8%3CBR%20%2F%3E9%3C%2FDIV%3E%3C%2FTD%3E%3CTD%3E%3CDIV%20class%3D%22text%20codecolorer%22%3E%24National%20%3D%20%24RGSPrepend%2B%22National%22%3CBR%20%2F%3E%24Vic%20%3D%20%24RGSPrepend%2B%22Victoria%22%3CBR%20%2F%3E%24NSW%20%3D%20%24RGSPrepend%2B%22New%20South%20Wales%22%3CBR%20%2F%3E%24QLD%20%3D%20%24RGSPrepend%2B%22Queensland%22%3CBR%20%2F%3E%24ACT%20%3D%20%24RGSPrepend%2B%22ACT%22%3CBR%20%2F%3E%24NT%20%3D%20%24RGSPrepend%2B%22Northern%20Territory%22%3CBR%20%2F%3E%24SA%20%3D%20%24RGSPrepend%2B%22South%20Australia%22%3CBR%20%2F%3E%24WA%20%3D%20%24RGSPrepend%2B%22Western%20Australia%22%3CBR%20%2F%3E%24Tas%20%3D%20%24RGSPrepend%2B%22Tasmania%22%3C%2FDIV%3E%3C%2FTD%3E%3C%2FTR%3E%3C%2FTBODY%3E%3C%2FTABLE%3E%3C%2FDIV%3E%3CH2%20id%3D%22toc-hId--803710749%22%20id%3D%22toc-hId--636349621%22%3EVersion%20history%3C%2FH2%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%26nbsp%3B19%2F05%2F2018%20Released%20Version%202.2%3CBR%20%2F%3EFixed%20a%20bug%20with%20logging%20system%20culture%3CBR%20%2F%3ERemoved%20some%20old%20redundant%20code%3CBR%20%2F%3EPassed%20script%20through%20ISESteriods%20PSSharper%20and%20applied%20corrections%3CBR%20%2F%3EFixed%20a%20few%20typos%3CBR%20%2F%3EFixed%20a%20few%20bugs%20introduced%20cleaning%20up%20my%20dodgy%20code%3CBR%20%2F%3EFixed%20a%20bug%20with%20multiple%20pools%20using%20the%20same%20holiday%20set%20names%3CBR%20%2F%3EDeprecated%20the%20ServiceID%20parameter%2C%20Specify%20the%20pool%20FQDN%20instead%3CBR%20%2F%3EAdded%20warning%20for%20deprecated%20ServiceID%3CBR%20%2F%3EUpdated%20Pat%20Richard's%20website%3CBR%20%2F%3ERemoved%20PowerShell%205.1%20cmdlet%20(Get-Timezone)%2C%20now%20using%20a%20WMI%20query%20instead%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%26nbsp%3B11%2F05%2F2018%20Released%20Version%202.1%20with%20TLS%201.2%20support%3CBR%20%2F%3EAdded%20Script%20logging%3CBR%20%2F%3EUpdated%20to%20use%20my%20new%20autoupdate%20code%3CBR%20%2F%3EAdded%20ability%20to%20switch%20between%20devel%2Fmaster%20branches%3CBR%20%2F%3EAdded%20timezone%20offset%20detection%20%2F%20warning%3CBR%20%2F%3EAdded%20TLS%201.2%20support%20for%20the%20new%20Govt%20website%20requirements%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%26nbsp%3B09%2F10%2F2017%20Released%20Version%202.0%20with%20a%20Massive%20Overhaul%2C%20updated%20for%202018!%3CBR%20%2F%3EAdded%20Autodetecton%20of%20single%20RGS%20pool%26nbsp%3B%3A%20Added%20Autodetecton%20of%20single%20RGS%20pool%3CBR%20%2F%3EComplete%20Rewrite%20of%20existing%20rule%20rewrite%20code%20%2C%20Should%20make%20for%20alot%20less%20red%20text!%3CBR%20%2F%3EMore%20User%20friendly%20and%20better%20instructions%3CBR%20%2F%3EFixed%20a%20few%20typo%E2%80%99s%20causing%20dates%20to%20be%20incorrect.%3CBR%20%2F%3EYou%20no%20longer%20need%20to%20%E2%80%9CReassign%E2%80%9D%20the%20holiday%20sets%20to%20response%20groups%20anymore.%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%26nbsp%3B2%2F11%2F2016%3A%20Released%20Version%201.1%20of%20the%20script.%20Fixed%20Onedrive%20download%20link%3C%2FP%3E%3CP%3EFix%20for%20Typo%20in%20Victora%20Holiday%20set%20causing%20import%20to%20fail%3CBR%20%2F%3EFix%20ForEach%20loop%20not%20correctly%20removing%20old%20time%20frames%3CBR%20%2F%3EFix%20Documentation%20not%20including%20the%20SID%20for%20ServiceID%20parameter%3C%2FP%3E%3CP%3E%3CSTRONG%3EUpdate%26nbsp%3B%3C%2FSTRONG%3E26%2F09%2F2016%3A%20Fixed%20some%20Typo%E2%80%99s.%20Thanks%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgreiginsydney.com%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3EGrieg%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-192630%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAustralia%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDownload%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EResponse%20Group%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Escripts%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-195421%22%20slang%3D%22en-US%22%3ERe%3A%20Updated%20Automatic%20Australian%20RGS%2FResponse%20Groups%20Holiday%20Sets%20v.2.20%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-195421%22%20slang%3D%22en-US%22%3E%3CP%3EBumping%20for%20a%20new%20update.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSTRONG%3EUpdate%3C%2FSTRONG%3E%3CSPAN%3E%26nbsp%3B19%2F05%2F2018%20Released%20Version%202.2%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EFixed%20a%20bug%20with%20logging%20system%20culture%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ERemoved%20some%20old%20redundant%20code%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EPassed%20script%20through%20ISESteriods%20PSSharper%20and%20applied%20corrections%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EFixed%20a%20few%20typos%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EFixed%20a%20few%20bugs%20introduced%20cleaning%20up%20my%20dodgy%20code%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EFixed%20a%20bug%20with%20multiple%20pools%20using%20the%20same%20holiday%20set%20names%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EDeprecated%20the%20ServiceID%20parameter%2C%20Specify%20the%20pool%20FQDN%20instead%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EAdded%20warning%20for%20deprecated%20ServiceID%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EUpdated%20Pat%20Richard's%20website%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3ERemoved%20PowerShell%205.1%20cmdlet%20(Get-Timezone)%2C%20now%20using%20a%20WMI%20query%20instead%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Contributor

Update 19/05/2018 Released Version 2.2 to fix an issue with multiple pool selection, typos and even cleaning up my code with ISESteriods

About the tool

For those that don't know, I've been writing and maintaining this script for a few years over on TechNet This is a script that adds/maintains the relevant Australian Holidays to your Skype4B  / Lync environment for the next 12 months based on data available from the Australian Government Website.

I re-wrote most of the script from scratch and added a whole bunch of code to try and catch a lot of the errors etc that happened in the older versions. I’ve also tried to make it alot simpler to use for everyone that’s not me. 

Data is taken from http://www.australia.gov.au/about-australia/special-dates-and-events/public-holidays and I have done my best to be as error free as possible.

Shout of to Greig in Sydney for beta testing and providing the red pen. That guy would have made a brilliant English teacher.

 

Instructions

Download, and run on a Frontend or any machine with the Lync / Skype4B management tools installed

The script will attempt to detect your Skype4B Setup and proceed accordingly

  • If it only detects a single FrontEnd it will prompt you to confirm the selected pool and then configure new Holiday sets
  • Should it detect multiple pools it will ask you to confirm which pool to use and configure new Holiday sets
  • If it finds Holiday sets with the same name they will automatically have any existing entries removed

If you already have holiday sets with the name names or you need to add a country code. You can specify a string with the -RGSPrepend parameter to prepend to the Holiday set names.

Unattended (Scheduled Task) execution

You can also use the script on a scheduled task to automatically pull and update the latest holidays on a monthly basis if your server has internet access.
Simply specify -FrontEndPool <FEPoolFQDN> and -Unattended in the scheduled task.

You can also still specify the -ServiceID and -Unattended parameters at the commandline if you want to specify the ServiceID directly.
Use Get-CsRgsConfiguration -Identity Frontend.Skype4bAdmin.com to see valid service id’s

Note either of these options will disable script update checking. So it pays to check manually every now and again.

Applying the Holiday sets

After you have run the script, you can find the time frames in the Response Groups Editor, Simply tick the states you want the workflow closed for.
Note: each of the states already includes the National holiday set, so there is no need to tick both.

Fork Me

As alot of my code is open source, I’ve moved from storing my Git repo on VSTS over to GitHub. Feel free to fork the code for your own purposes over here

https://github.com/Atreidae/New-CsRgsAustralianHolidayList

Advanced

The default holiday set names are “National”,”Victoria”,”New South Wales”,”Queensland”,”ACT”,”Northern Territory”,”South Australia”,”Western Australia”,”Tasmania”
If you need to change these for whatever reason update the following lines in the script

1
2
3
4
5
6
7
8
9
$National = $RGSPrepend+"National"
$Vic = $RGSPrepend+"Victoria"
$NSW = $RGSPrepend+"New South Wales"
$QLD = $RGSPrepend+"Queensland"
$ACT = $RGSPrepend+"ACT"
$NT = $RGSPrepend+"Northern Territory"
$SA = $RGSPrepend+"South Australia"
$WA = $RGSPrepend+"Western Australia"
$Tas = $RGSPrepend+"Tasmania"

Version history

Update 19/05/2018 Released Version 2.2
Fixed a bug with logging system culture
Removed some old redundant code
Passed script through ISESteriods PSSharper and applied corrections
Fixed a few typos
Fixed a few bugs introduced cleaning up my dodgy code
Fixed a bug with multiple pools using the same holiday set names
Deprecated the ServiceID parameter, Specify the pool FQDN instead
Added warning for deprecated ServiceID
Updated Pat Richard's website
Removed PowerShell 5.1 cmdlet (Get-Timezone), now using a WMI query instead

 

Update 11/05/2018 Released Version 2.1 with TLS 1.2 support
Added Script logging
Updated to use my new autoupdate code
Added ability to switch between devel/master branches
Added timezone offset detection / warning
Added TLS 1.2 support for the new Govt website requirements

Update 09/10/2017 Released Version 2.0 with a Massive Overhaul, updated for 2018!
Added Autodetecton of single RGS pool : Added Autodetecton of single RGS pool
Complete Rewrite of existing rule rewrite code , Should make for alot less red text!
More User friendly and better instructions
Fixed a few typo’s causing dates to be incorrect.
You no longer need to “Reassign” the holiday sets to response groups anymore.

Update 2/11/2016: Released Version 1.1 of the script. Fixed Onedrive download link

Fix for Typo in Victora Holiday set causing import to fail
Fix ForEach loop not correctly removing old time frames
Fix Documentation not including the SID for ServiceID parameter

Update 26/09/2016: Fixed some Typo’s. Thanks Grieg

1 Reply

Bumping for a new update.


Update 19/05/2018 Released Version 2.2
Fixed a bug with logging system culture
Removed some old redundant code
Passed script through ISESteriods PSSharper and applied corrections
Fixed a few typos
Fixed a few bugs introduced cleaning up my dodgy code
Fixed a bug with multiple pools using the same holiday set names
Deprecated the ServiceID parameter, Specify the pool FQDN instead
Added warning for deprecated ServiceID
Updated Pat Richard's website
Removed PowerShell 5.1 cmdlet (Get-Timezone), now using a WMI query instead