if a variable is less than 8 characters long pad leading 0s till it it’s 8 characters

$countvar = $somevar | measure-object -character | select -expandproperty characters

if ($countvar -lt 8) { need to figure out how to add padded 0s to a number variable if it isn’t 8 characters already

}

submitted by /u/jdb5345
[link] [comments]

Leave a Reply