Enabling MSBuild support for Visual Studio 2015 PowerShell Projects
Visual Studio 2015 VSIX (extensions) do not support installation of MSBuild targets or tasks. In order to enable support for this in Visual Studio 2015, you will need to copy the targets and tasks from the extension installation folder into the MSBuild folder.
First, locate the PowerShell Tools or PowerShell Pro Tools installation folder. It will be under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions. The folder name is autogenerated. You will likely want to search for “PowerShellTools” or “PowerShellToolsPro”.
Once you locate the folder, there will be a PowerShell Tools for Visual Studio or a PowerShell Pro Tools folder. Copy the folder to C:\Program Files (x86)\MSBuild. You will need to close and re-open your solution in order to reload the MSBuild targets.
This is not a requirement for Visual Studio 2017.