How to Add Software Installation Policy to a Newly Created GPO with PowerShell or C#?
I am developing a C# application and using the following PowerShell script to create a new Group Policy Object (GPO) and link it to a specified domain or organizational unit. The script works fine for creating the GPO and linking it, but I am struggling with adding a software installation policy to this GPO. Specifically, I want to assign the installation of an MSI package located at $MsiPath
(in a shared folder).