how do i go about setting a character limit for the following code? would i need a IF statement here checking the length?
do { $VM = Read-Host "Enter Server Name" }
until ($VM)
i have tried
do { [string][validatelength(0,15)] $VM = Read-Host "Enter Server Name" }
until ($VM)
this is great if the input text is no more than 15... if its over it errors out i need it to loop back so it asks for the correct name
how do i go about tweaking this?
thanks