cancel
Showing results for 
Search instead for 
Did you mean: 

Push pulsepreconfig through GPO

SOLVED
New Contributor

Push pulsepreconfig through GPO

Hi

 

i'm trying to push a pulsepreconfig through GPO in the following way:

 

"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\jamCommand.exe" /importfile "<pathToFile>.pulsepreconfig"

 

The <pathToFile> refers to a file on the local disk.

 

For some reason it doesn't work. I tried to run it both as a startup and logon script both no luck. Running the script directly from the GUI or CMD works perfectly (even un-elevated), only through GPO not working. No error message is shown.

 

When can I find jamCommand log information to troubleshoot the issue and is this a known issue?

 

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Push pulsepreconfig through GPO

r@yElr3y found the issue. I guess the script ran before the service was started. If modified my script so it would loop until the service has been started. Works like a charm now. Thanks for the help.

 

:x

for /F "tokens=3 delims=: " %%H in ('sc query "PulseSecureService" ^| findstr " STATE"') do (
IF /I "%%H" NEQ "RUNNING" (
timeout 5 /nobreak
goto x
)
)

"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\jamCommand.exe" -importfile %PULSE-CONFIG%

 

View solution in original post

5 REPLIES 5
Moderator

Re: Push pulsepreconfig through GPO

@hushkin Is <PathtoFile> a relative or absolute path? Please try using the fullpath of the file and check the behavior.

 

Logs (debuglog.log) will be located in "C:\ProgramData\Pulse Secure\Logging"

PCS Expert
Pulse Connect Secure Certified Expert
New Contributor

Re: Push pulsepreconfig through GPO

r@yElr3y @Thank you for your reply. I have tried prestaging the file in for example C:\Pulse and referring to the path C:\Pulse\Pulse21102019.pulsepreconfig. 

 

I have also tried a UNC-path on which all Authenticated Users have Read share & NTFS permissions.

 

A last thing I tried was creating the config file using the same BAT-script which contains the jamCommand.exe command. I'm doing this by outputting each line of the config to a file on the local drive. For example:

 

REM ----- Create Pulse config file -----

echo schema version { > %PULSE-CONFIG%
echo version: "1" >> %PULSE-CONFIG%
echo } >> %PULSE-CONFIG%

echo. >> %PULSE-CONFIG%

echo machine settings { >> %PULSE-CONFIG%
echo version: "22" >> %PULSE-CONFIG%

...

 

Which properly created the config file on the location but again, the jamCommand.exe executable is not able to import the config.

 

I will revert back with info from the debuglog.log

 

Moderator

Re: Push pulsepreconfig through GPO

@hushkin Thank you for the update. Are you saying that both local and UNC shared preconfig file was NOT working with jamcommand?

 

# Jamcommand would attempt to read the script file and then update the connection store.


Below are the events recorded when I try to import a bogus file: 😉

 

00143,09 2020/12/24 14:38:54.008 3 rayappan jamCommand.exe jamCommand p14060 t3008 jamCommand.cpp:1401 - 'jamCommand' Import data to connection store.
00145,09 2020/12/24 14:38:54.008 1 rayappan jamCommand.exe jamCommand p14060 t3008 jamCommand.cpp:694 - 'jamCommand' unable to open script file test.txt
00141,09 2020/12/24 14:38:54.008 1 rayappan jamCommand.exe jamCommand p14060 t3008 jamCommand.cpp:1417 - 'jamCommand' ImportFromFile failed. Code -1

 

Command used - jamcommand.exe -importfile test.txt

 

PCS Expert
Pulse Connect Secure Certified Expert
New Contributor

Re: Push pulsepreconfig through GPO

r@yElr3y found the issue. I guess the script ran before the service was started. If modified my script so it would loop until the service has been started. Works like a charm now. Thanks for the help.

 

:x

for /F "tokens=3 delims=: " %%H in ('sc query "PulseSecureService" ^| findstr " STATE"') do (
IF /I "%%H" NEQ "RUNNING" (
timeout 5 /nobreak
goto x
)
)

"C:\Program Files (x86)\Common Files\Pulse Secure\JamUI\jamCommand.exe" -importfile %PULSE-CONFIG%

 

View solution in original post

Moderator

Re: Push pulsepreconfig through GPO

@hushkin Nice...! Thank you for sharing this info. Smiley Happy

PCS Expert
Pulse Connect Secure Certified Expert