To add PowerShell scripting to your program, you first have to add a reference to the System.Management.Automation assembly. Powershell usually installs this assembly in the C:\Program Files\Reference Assemblies\Microsoft\WindowsPowerShell\v1.0 directory. But inside C:\Program Files\Reference Assemblies\Microsoft folder there is only a folder called "Framework", no WindowsPowerShell folder found. [psobject].assembly.location gives "C:\Windows\assembly\GAC_MSIL\System.Management.Automation\18.104.22.168__31bf3856ad364e35\System.Management.Automation.dll". I tried to copy the dll from the GAC to C:\ but failed with access denied error. Please help. Any help is appriciated.