Skip to content

Commit

Permalink
NB-11852: Windows Set ReleaseChannel In JumpCloud Password Manager co…
Browse files Browse the repository at this point in the history
…mmand
  • Loading branch information
gbitarjc committed Jun 21, 2024
1 parent 7f9aca5 commit f882502
Showing 1 changed file with 59 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#### Name

Windows - Set JumpCloud Password Manager's Release Channel | v1.0 JCCG

#### commandType

windows

#### Command

```
# Set $RELEASE_CHANNEL to "beta", "dogfood", or "public" depending on your desired releaseChannel
$RELEASE_CHANNEL = "public"
# Set $TARGET_ENVIRONMENT to "production", "staging", or "local" to target user's environment
$TARGET_ENVIRONMENT = "production"
#------- Do not modify below this line ------
$APP_NAME = "JumpCloud Password Manager"
# Function to set application's name
function Detect-Env {
switch ($TARGET_ENVIRONMENT) {
"production" { $global:APP_NAME = "JumpCloud Password Manager" }
"staging" { $global:APP_NAME = "JC Password Manager Staging" }
"local" { $global:APP_NAME = "JC Password Manager Local" }
default { $global:APP_NAME = "JumpCloud Password Manager" }
}
}
# Function to update or create file content
function Update-File {
$HOME = [System.Environment]::GetFolderPath('UserProfile')
$FILE_PATH = "$HOME\AppData\Roaming\$global:APP_NAME\data\daemon\releaseChannel.txt"
$dir = Split-Path $FILE_PATH
New-Item -ItemType Directory -Force -Path $dir | Out-Null
Set-Content -Path $FILE_PATH -Value $RELEASE_CHANNEL -NoNewline
}
function Main {
Detect-Env
Update-File
}
Main
```

#### Description

This command will set the desired release channel for JumpCloud's Password Manager in application's directory. The relesase channel options are beta, dogfood and public.

#### *Import This Command*

To import this command into your JumpCloud tenant run the below command using the [JumpCloud PowerShell Module](https://github.com/TheJumpCloud/support/wiki/Installing-the-JumpCloud-PowerShell-Module)

0 comments on commit f882502

Please sign in to comment.