I am trying to deploy to the computers at my workplace a powershell script that adds two folders to the windows firewall exceptions. I have followed the instructions on the wiki, and according to the log that fog spits out on the computer I’m deploying to, the script has run and completed, returning error code:0 (I’m assuming that means no error).

I have manually run this script many a time with no problems. But when I run it through snapin it doesn’t add the exceptions. Am I doing something wrong in my script?

]]>https://forums.fogproject.org/topic/10981/powershell-snapinRSS for NodeFri, 22 Feb 2019 14:16:21 GMTFri, 20 Oct 2017 17:32:08 GMT60I am trying to deploy to the computers at my workplace a powershell script that adds two folders to the windows firewall exceptions. I have followed the instructions on the wiki, and according to the log that fog spits out on the computer I’m deploying to, the script has run and completed, returning error code:0 (I’m assuming that means no error).

I have manually run this script many a time with no problems. But when I run it through snapin it doesn’t add the exceptions. Am I doing something wrong in my script?

]]>https://forums.fogproject.org/post/103675https://forums.fogproject.org/post/103675Fri, 20 Oct 2017 17:32:08 GMT@Alfredo-the-Pasta are both exceptions failing to add or just the network drive?
]]>https://forums.fogproject.org/post/103676https://forums.fogproject.org/post/103676Fri, 20 Oct 2017 17:45:58 GMTI can’t really help with snapins or powershell. But I can tell you that snapins run (execute) as the user “SYSTEM” so if your PS interacts with user sessions then SYSTEM has the exemptions you are watching.

Also there is a fog.log file on the target computer, there may be additional information in that file to the state of execution of your PS script.

]]>https://forums.fogproject.org/post/103678https://forums.fogproject.org/post/103678Fri, 20 Oct 2017 17:48:08 GMT@alfredo-the-pasta you may want to try retrieving the success state of each cmdlet and saving it to a file:

]]>https://forums.fogproject.org/post/103679https://forums.fogproject.org/post/103679Fri, 20 Oct 2017 17:53:34 GMTIt’s very possible that you just can’t run these with SYSTEM, which is what FOG snapins run as. I’ve had other commands not function via Snapin that work just fine when running locally.

Is there a batch\command file alternative?

Also, this appears to be a Windows 10 command. I do not have it on my Windows 7 box, but it’s there on Windows 10.

Avaryan may be right. I’ll have to search for a command line equivalent.

]]>https://forums.fogproject.org/post/103681https://forums.fogproject.org/post/103681Fri, 20 Oct 2017 18:07:21 GMT@alfredo-the-pasta You may be able to add the paths directly to the registry. Give me a few minutes.
]]>https://forums.fogproject.org/post/103682https://forums.fogproject.org/post/103682Fri, 20 Oct 2017 18:08:59 GMTNope, doesn’t seem to allow me to do that. Seems Microsoft doesn’t want you doing this this way.

SYSTEM has Full Control permission to this path though, so not sure why it didn’t work from Snapin.

]]>https://forums.fogproject.org/post/103684https://forums.fogproject.org/post/103684Fri, 20 Oct 2017 18:33:14 GMTJust dug around, and it would appear that you are right about being able to use GPO. Is there a way to automate this? If not I’m probably just going to go back to sneakernetting this from a flash drive. We haven’t joined our computer to a domain yet so I can’t really push it that way.
]]>https://forums.fogproject.org/post/103685https://forums.fogproject.org/post/103685Fri, 20 Oct 2017 18:39:23 GMT