kubasiatkowski / SCCMChoco

GNU Lesser General Public License v3.0
44 stars 14 forks source link

Issue + Solution for Site Code error (pattern validation) #10

Open jonswc opened 4 years ago

jonswc commented 4 years ago

Can't remember exactly what error was being thrown, but solution was editing "SCCMChoco.psm1" @ line 76.

Cause: My site code was "P01" - which is LETTER-NUMBER-NUMBER but the validation pattern wouldn't allow my second digit to be a "number" and had to edit to pattern right above [string] $CMSiteCode

Line 76 original: (do not add spaces, that was just for easier viewing)

[ValidatePattern('^[A-Z]{ 2 }[A-Z0-9]{ 1 }$')]

Line 76 edit: (do not add spaces, that was just for easier viewing)

[ValidatePattern('^[A-Z]{ 1 }[A-Z0-9]{ 2 }$')]