I've created a Powershell function that takes in a string. I'm trying to validate that the char count of a string param is over 4, however whenever I check the param, the count is always 1.
Why is this so?
function DeleteSitesWithPrefix($prefix){
if([string]::IsNullOrEmpty($prefix)){
Write-Host "Please provide the name of the csv file to use"
return
}
if([string]::$prefix.Length -lt 4){
Write-Host "Please provide a prefix of 4 or more digits"
return
}
if ($prefix.Length -lt 4) {...?