PowerShell Escape Special Characters

To experiment with SharePoint 2010 without the hassle of starting slow VM’s I installed SharePoint 2010 on my Windows 7 environment. To limit the performance impact on my system when I’m not working on SharePoint I ended up with these great little PowerShell scripts to start/stop the server. My SQL Server instance is named SQL$SHAREPOINT so I needed to modify the script a little to change the name of the service. However, when I changed the instance name the script was not finding the service until I realized that the $ sign is a special character in PowerShell that needs to be escaped by using the backtick `.

One more PowerShell lesson learned!