-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NB-11852: Windows Set ReleaseChannel In JumpCloud Password Manager co…
…mmand
- Loading branch information
Showing
1 changed file
with
59 additions
and
0 deletions.
There are no files selected for viewing
59 changes: 59 additions & 0 deletions
59
.../Windows Commands/Windows - Set ReleaseChannel In JumpCloud Password Manager.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|