Quantcast
Channel: Ignite Realtime : Discussion List - All Communities
Viewing all articles
Browse latest Browse all 10742

How to set Spark Properties without losing user preferences (windows)

$
0
0

I wanted a way to set some properties with spark without overwriting the users preferences.  Here is the solution I came up with.

There are a few assumptions made.  First you have powershell install on the workstation, that spark.properties is in the same location for everyone.

 

create a powershell script with the following, and then run it at logon script via GPO.

 

$updates=@{

     'ssoEnabled'='true'

     'server'='xmppserver.com'

     'autoLoginEnabled'='true'

     'toasterPopup'='true'

     'windowTakesFocus'='true'

  

}

(Get-Content $env:APPDATA\spark\spark.properties) |

     ForEach-Object{

          $key=$_.Split('=')[0]

          if($val=$updates[$key]){

              '{0}={1}' -f $key,$val

          }else{

              $_

          }

     } |

Set-Content $env:APPDATA\spark\spark.properties

 

That's it. Hope this helps


Viewing all articles
Browse latest Browse all 10742

Trending Articles