Remove all special characters including spaces

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

Example
PS C:\> $string = "1. Computer name:DC-G11-FTW.contoso.com"
>> [regex]::Replace($string,"[^0-9a-zA-Z]","")

1ComputernameDCG11FTWcontosocom