$string = "1. Computer name:DC-G11-FTW.contoso.com"
[regex]::Replace($string,"[^0-9a-zA-Z]","")
Uses a regex expression with replace to remove all characters that do not match the expression.
PS C:\> $string = "1. Computer name:DC-G11-FTW.contoso.com" >> [regex]::Replace($string,"[^0-9a-zA-Z]","") 1ComputernameDCG11FTWcontosocom