Why you are doing the name check on client side, I suppose that the server can detect wrong names and provide meaningful message. By doing this we couple the PowerShell code from the server side so we don't have to change this if storage team decided to change the naming rules in the future