Jeffrey Williams (1/8/2009)
Interesting - you probably have a character in the computer name that is causing a problem.
Actually, there was nothing wrong with the original code. Even taking the quotes out, it now works. I just ran the exact same line of code as yesterday, and I get no error. There are only alphanumeric characters in the name.
It must be something flaky with our network....
I wish there was a way to trap the specific error powershell/WMI is throwing...
SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
Persisting SQL Server Index-Usage Statistics with MERGE[/url]
Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]