PS C:\> $a = [string]"This string CONTAINS a number of letters"PS C:\> $a -match 'a number'TrueHow would I capture the resultant VALUE of "True" in a VARIABLE from match?Couple of WAYS, this might be the easiest:Code: [Select]$a = [string]"This string contains a number of letters"$result = $a -match 'a number'$result
Your experience on this site will be improved by allowing cookies. Read Cookie Policy