I am using powershell to list security events on remote servers. I have come across a problem because some of our servers contain a hyphen in their name.
get-eventlog -logname security -Computername Test-Server
I have tried to use Double Quotes and Single Quotes but I keep getting an invalid handle. What is the correct way to pass a server name with a hyphen it its name to the command.
Thanks
Duncan