Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install-AzSKOrganizationPolicy results in erroneous message about Only Alphanumeric characters are allowed. #966

Open
njohnso opened this issue Mar 5, 2020 · 0 comments

Comments

@njohnso
Copy link

njohnso commented Mar 5, 2020

Error Received when running the command is:

InvalidArgument: Only alphanumeric characters are supported in StorageAccountName param. And length should be less than 24 characters

Found that using all numbers resulted in no issues. SO I looked intot he code to detemrine why this was the case. Found out that uppercase letters were what prevented function of the script.

$storageRegEx = [regex]"^[a-z0-9]{3,24}$"

On this line the RegEx being used only accounts for lowercase letters. Either the script should convert all inputs to lowercase or the regex should accept both uppercase and lowercase letters as such:

$storageRegEx = [regex]"^[A-Za-z0-9]{3,24}$"

@njohnso njohnso changed the title RegEx results in erroneous message about Only Alphanumeric characters are allowed. Install-AzSKOrganizationPolicy results in erroneous message about Only Alphanumeric characters are allowed. Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant