I'm trying to create an enum of our SQL Servers
Add-Type -TypeDefinition @"
public enum OurServers3
{
Srv1,
Srv1\Instance1
}
"@
The backslash in the instance name is giving me headaches! Any ideas? I've tried escaping with ` and \, surrounding with double-quotes...
Any ideas?
You could also try using -
Encode-SqlName -SQLName "Srv1\Instance1"
Sue