Creating Software restriction policy in GPO via powershell

Hi Everyone,

I have come across a roadblock and cant find a way around this.
I am trying to PowerShell the creation of a GPO that I often have to create.
This is the process I have to do each time. (apologies there’s a few images and the formatting is bad!)

album link

The Path’s I’m trying to do this for are

  • Path 1: C:\Program Files (x86)\Google\Chrome\Application\Chrome.exe
  • Path 2: C:\Program Files (x86)\Microsoft Office\Office14\Outlook.exe
  • Path 3: C:\Program Files (x86)\Microsoft Office\Office15\Outlook.exe
  • Path 4:C:\Program Files (x86)\Microsoft Office\Office16\Outlook.exe
  • Path 5:C:\Program Files (x86)\Microsoft Office\root\Office15\outlook.exe
  • Path 6:C:\Program Files (x86)\Microsoft Office\root\Office16\outlook.exe
  • Path 7:C:\Program Files (x86)\Mozilla Firefox\firefox.exe
  • Path 8:C:\Program Files\Google\Chrome\Application\Chrome.exe
  • Path 9:C:\Program Files\Microsoft Office\Office14\Outlook.exe
  • Path 10:C:\Program Files\Microsoft Office\Office15\Outlook.exe
  • Path 11:C:\Program Files\Microsoft Office\Office16\Outlook.exe
  • Path 12:C:\Program Files\Microsoft Office\root\Office15\outlook.exe
  • Path 13:C:\Program Files\Microsoft Office\root\Office16\outlook.exe
  • Path 14:C:\Program Files\Mozilla Firefox\firefox.exe

you can better create it once, export it and us Import-GPO cmdlet to import it.