SwitchCraft provides a powerful command-line interface for automation, CI/CD pipelines, and scripting. This reference documents all available commands in Linux man-page style.
switchcraft — The Ultimate Packaging Assistant CLI
switchcraft [OPTIONS] COMMAND [ARGS]...SwitchCraft CLI enables you to analyze installers, manage Intune packages, interact with Winget, manage Entra ID groups, and automate deployment workflows — all from the command line.
| Option | Description |
|---|---|
--version |
Show version information and exit |
--help |
Show help message and exit |
--json |
Output results in JSON format (where applicable) |
| Variable | Description |
|---|---|
SWITCHCRAFT_SUPPRESS_HEADER |
Set to suppress debug header in logs |
Analyze an installer file to detect silent switches and metadata.
Synopsis:
switchcraft analyze <FILEPATH> [--json]Arguments:
FILEPATH— Path to the installer file (MSI, EXE, DMG, PKG)
Options:
--json— Output analysis results in JSON format
Examples:
# Analyze an MSI installer
switchcraft analyze installer.msi
# Analyze with JSON output for scripting
switchcraft analyze setup.exe --json
# Analyze a macOS package
switchcraft analyze app.dmgOutput: Returns product name, version, installer type, silent install/uninstall switches, and confidence level.
Manage SwitchCraft configuration values and secrets.
Synopsis:
switchcraft config <SUBCOMMAND> [OPTIONS]Subcommands:
Read a configuration value.
switchcraft config get <KEY>Example:
switchcraft config get Language
switchcraft config get IntuneTenantIdSet a configuration value.
switchcraft config set <KEY> <VALUE>Example:
switchcraft config set Language de-DE
switchcraft config set IntuneTenantId your-tenant-id
switchcraft config set IntuneClientId your-client-idSecurely store a secret in Windows Credential Manager.
switchcraft config set-secret <KEY> [-v VALUE]If -v is not provided, the secret is prompted securely (hidden input).
Example:
# Prompted input (recommended)
switchcraft config set-secret IntuneClientSecret
# Direct value (use with caution)
switchcraft config set-secret IntuneClientSecret -v "my-secret"Encrypt a value for use in Registry/GPO deployments.
switchcraft config encrypt [--plaintext VALUE]Example:
switchcraft config encrypt
# Enter plaintext at prompt...
# Output: gAAAAABk... (Store in Registry with _ENC suffix)Interact with the Windows Package Manager (Winget).
Note: Requires the
wingetaddon to be installed.
Synopsis:
switchcraft winget <SUBCOMMAND> [OPTIONS]Subcommands:
Search for packages in the Winget repository.
switchcraft winget search <QUERY>Example:
switchcraft winget search "Visual Studio Code"
switchcraft winget search chromeInstall a package via Winget.
switchcraft winget install <PKG_ID> [--scope user|machine]Options:
--scope— Install scope:userormachine(default:machine)
Example:
switchcraft winget install Microsoft.VisualStudioCode
switchcraft winget install Google.Chrome --scope userShow detailed information about a package.
switchcraft winget info <PKG_ID> [--json]Example:
switchcraft winget info Mozilla.Firefox
switchcraft winget info 7zip.7zip --jsonList all installed Winget packages.
switchcraft winget list-installed [--json]Intune packaging and upload tools.
Synopsis:
switchcraft intune <SUBCOMMAND> [OPTIONS]Subcommands:
Check or download the IntuneWinAppUtil packaging tool.
switchcraft intune toolDownloads the tool automatically if not present.
Create an .intunewin package for Intune deployment.
switchcraft intune package <SETUP_FILE> -o <OUTPUT> -s <SOURCE> [--quiet|--verbose]Options:
-o, --output— Output folder for the package (required)-s, --source— Source folder containing the installer (required)--quiet/--verbose— Control tool output verbosity (default: quiet)
Example:
switchcraft intune package setup.exe -o dist -s .
switchcraft intune package installer.msi -o C:\Packages -s C:\Source --verboseUpload an .intunewin package directly to Microsoft Intune.
switchcraft intune upload <INTUNEWIN> --name <NAME> --publisher <PUB> \
--install-cmd <CMD> --uninstall-cmd <CMD> [--description <DESC>]Prerequisites: Configure credentials first:
switchcraft config set IntuneTenantId <your-tenant-id>
switchcraft config set IntuneClientId <your-client-id>
switchcraft config set-secret IntuneClientSecretOptions:
--name— App display name (required)--publisher— App publisher (required)--install-cmd— Install command line (required)--uninstall-cmd— Uninstall command line (required)--description— App description (optional)
Example:
switchcraft intune upload myapp.intunewin \
--name "My Application" \
--publisher "Contoso Ltd" \
--install-cmd "setup.exe /S" \
--uninstall-cmd "uninstall.exe /S" \
--description "Internal productivity tool"Manage SwitchCraft extension addons.
Synopsis:
switchcraft addons <SUBCOMMAND>Subcommands:
List installed addons and their status.
switchcraft addons listInstall an addon.
switchcraft addons install <ADDON_ID>Available Addon IDs:
advanced— Advanced analyzer featureswinget— Winget integrationai— AI-powered assistanceall— Install all addons
Example:
switchcraft addons install winget
switchcraft addons install allManage session logging.
Synopsis:
switchcraft logs <SUBCOMMAND>Subcommands:
Export session logs to a file.
switchcraft logs export [-o OUTPUT]Options:
-o, --output— Output file path (default:switchcraft_session.log)
Example:
switchcraft logs export
switchcraft logs export -o debug_session.logManage analysis history.
Synopsis:
switchcraft history <SUBCOMMAND> [OPTIONS]Subcommands:
List analysis history entries.
switchcraft history list [--json] [-n LIMIT]Options:
--json— Output in JSON format-n, --limit— Number of entries to show (default: 20)
Example:
switchcraft history list
switchcraft history list -n 50 --jsonClear all analysis history.
switchcraft history clearPrompts for confirmation before clearing.
Export analysis history to a JSON file.
switchcraft history export -o <OUTPUT>Example:
switchcraft history export -o history_backup.jsonTest Intune detection rules locally before deployment.
Synopsis:
switchcraft detection test --type <TYPE> [OPTIONS]Detection Types:
Test if a registry key/value exists and matches expected value.
switchcraft detection test --type registry \
--key <KEY_PATH> --value <VALUE_NAME> [--expected <VALUE>]Example:
switchcraft detection test --type registry \
--key "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion" \
--value "ProgramFilesDir"
switchcraft detection test --type registry \
--key "HKLM\SOFTWARE\MyApp" \
--value "Version" \
--expected "1.2.3"Test if an MSI product is installed by its Product Code.
switchcraft detection test --type msi --product-code <GUID>Example:
switchcraft detection test --type msi \
--product-code "{12345678-1234-1234-1234-123456789012}"Test if a file exists and optionally compare its version.
switchcraft detection test --type file \
--path <FILE_PATH> [--version <VERSION>] [--operator eq|ge|le|gt|lt]Options:
--operator— Version comparison operator (default:ge)
Example:
switchcraft detection test --type file --path "C:\Program Files\MyApp\app.exe"
switchcraft detection test --type file \
--path "C:\Program Files\MyApp\app.exe" \
--version "2.0.0" \
--operator geTest a PowerShell detection script.
switchcraft detection test --type script --script <SCRIPT_FILE>Example:
switchcraft detection test --type script --script detection.ps1Manage Entra ID (Azure AD) groups via Microsoft Graph API.
Prerequisites: Configure Graph API credentials:
switchcraft config set IntuneTenantId <tenant>
switchcraft config set IntuneClientId <client>
switchcraft config set-secret IntuneClientSecretSynopsis:
switchcraft groups <SUBCOMMAND> [OPTIONS]Subcommands:
List Entra ID groups.
switchcraft groups list [-s SEARCH] [--json]Example:
switchcraft groups list
switchcraft groups list -s "IT Department"
switchcraft groups list --jsonCreate a new Entra ID group.
switchcraft groups create -n <NAME> [-d DESCRIPTION] [--type security|m365]Example:
switchcraft groups create -n "App Testers" -d "Beta testing group"
switchcraft groups create -n "Project Team" --type m365Delete an Entra ID group.
switchcraft groups delete --id <GROUP_ID>Prompts for confirmation.
List members of a group.
switchcraft groups members --id <GROUP_ID> [--json]Add a user to a group.
switchcraft groups add-member -g <GROUP_ID> -u <USER_ID>Remove a user from a group.
switchcraft groups remove-member -g <GROUP_ID> -u <USER_ID>Exchange Online management via Microsoft Graph API.
Prerequisites:
Same as groups — requires Graph API credentials.
Synopsis:
switchcraft exchange <SUBCOMMAND> [OPTIONS]Subcommands:
Get or set Out of Office (OOF) settings.
# Get OOF settings
switchcraft exchange oof get -u <USER>
# Set OOF settings
switchcraft exchange oof set -u <USER> --enabled --message "I'm away"
switchcraft exchange oof set -u <USER> --disabledExample:
switchcraft exchange oof get -u john@contoso.com
switchcraft exchange oof set -u john@contoso.com --enabled -m "On vacation until Monday"List mailbox delegates.
switchcraft exchange delegates -u <USER> [--json]Search messages in a mailbox.
switchcraft exchange mail-search -u <USER> [-q QUERY] [--json]Example:
switchcraft exchange mail-search -u john@contoso.com -q "project update"Manage deployment stacks for batch installations.
Synopsis:
switchcraft stacks <SUBCOMMAND> [OPTIONS]Subcommands:
List all deployment stacks.
switchcraft stacks list [--json]Create a new deployment stack.
switchcraft stacks create -n <NAME>Example:
switchcraft stacks create -n "Developer Workstation"Delete a deployment stack.
switchcraft stacks delete -n <NAME>Add an item to a stack.
switchcraft stacks add -n <STACK_NAME> -i <ITEM>Example:
switchcraft stacks add -n "Developer Workstation" -i "Microsoft.VisualStudioCode"
switchcraft stacks add -n "Developer Workstation" -i "Git.Git"
switchcraft stacks add -n "Developer Workstation" -i "Docker.DockerDesktop"Show items in a stack.
switchcraft stacks show -n <NAME>Deploy (install) all items in a stack.
switchcraft stacks deploy -n <NAME> [--dry-run]Options:
--dry-run— Show what would be installed without actually installing
Example:
# Preview deployment
switchcraft stacks deploy -n "Developer Workstation" --dry-run
# Execute deployment
switchcraft stacks deploy -n "Developer Workstation"Manage the local .intunewin package library.
Synopsis:
switchcraft library <SUBCOMMAND> [OPTIONS]Subcommands:
Scan directories for .intunewin files.
switchcraft library scan [-d DIRECTORY]... [--json]Options:
-d, --dirs— Directories to scan (default: Downloads, Desktop)
Example:
switchcraft library scan
switchcraft library scan -d "C:\Packages" -d "D:\IntuneApps"
switchcraft library scan --jsonShow detailed information about an .intunewin file.
switchcraft library info <INTUNEWIN_FILE> [--json]Example:
switchcraft library info myapp.intunewin
switchcraft library info C:\Packages\app.intunewin --json| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error or command failure |
| Path | Description |
|---|---|
%APPDATA%\FaserF\SwitchCraft\ |
Configuration and data directory |
%APPDATA%\FaserF\SwitchCraft\stacks.json |
Deployment stacks definition |
%APPDATA%\FaserF\SwitchCraft\history.json |
Analysis history |
Report bugs at: https://github.com/FaserF/SwitchCraft/issues