Skip to main content
Built-in Help: All commands and subcommands include automatically generated help pages accessible with -h, --help, /h, /?, or -?

Basic Syntax

Global Options

These options are available across most SharpSCCM commands:
Control how SharpSCCM displays information:
Configure how SharpSCCM connects to SCCM infrastructure:

Command Categories

get Command Group - Extract information from SCCM infrastructure
Common Parameters:
  • -n, --name: Filter by name pattern
  • -p, --properties: Specify properties to retrieve
  • -w, --where-condition: Custom WQL WHERE clause
  • -o, --order-by: Sort results

Site Configuration

Auto-Detection: SharpSCCM automatically detects site configuration when possible. Manual specification is only required in complex environments or when targeting specific infrastructure.

Automatic Site Discovery

1

Local Client Configuration

SharpSCCM first attempts to read local SCCM client configuration:
This reads from the local WMI repository at \\127.0.0.1\root\CCM.
2

Management Point Detection

If local configuration is available, SharpSCCM uses the current management point:
3

SMS Provider Location

The SMS Provider role may be hosted separately from management points. Use site discovery to identify it:

Manual Configuration

Scenarios requiring manual configuration:
  • Non-domain joined systems
  • SCCM client not installed
  • Targeting different sites
  • SMS Provider on separate server
  • Cross-domain operations
Manual specification examples:

Authentication & Permissions

Integrated Windows Authentication (Default)
Computer Account Authentication
Certificate-Based Authentication
Elevated Privileges

Common Usage Patterns

Step 1: Site Discovery
Step 2: Administrative Enumeration
Step 3: Asset Discovery
Step 4: Configuration Analysis
Step 1: Local Credential Extraction
Step 2: Policy-Based Extraction
Step 3: Credential Validation
Step 1: Target Identification
Step 2: Application Deployment
Step 3: Direct Execution
Step 4: Cleanup
Step 1: Target Assessment
Step 2: Coercion Execution
Step 3: Authentication Capture

Output Formats & Filtering

Standard Output
File Output
Quiet Operations

Troubleshooting & Debugging

Symptoms: Connection failures, authentication errorsDiagnostic Commands:
Common Solutions:
  • Verify SCCM client is installed and functioning
  • Check network connectivity to SMS Provider
  • Validate user permissions and group membership
  • Ensure proper site code and server names
Symptoms: Access denied, insufficient permissionsDiagnostic Approach:
Resolution Steps:
  • Add user to SMS Admins local group
  • Assign appropriate SCCM security roles
  • Use computer account for credential extraction
  • Escalate privileges locally if needed
Symptoms: Invalid WQL syntax, query failuresTesting Approach:
Best Practices:
  • Use dry run to validate syntax
  • Start with simple queries
  • Reference WMI class documentation
  • Escape special characters properly
Symptoms: No results, unexpected outputDebugging Commands:
Analysis Steps:
  • Verify query returned results with count option
  • Check permissions for the queried objects
  • Use verbose mode to see all available properties
  • Review debug output for connection details

Best Practices

1

Start with Read-Only Operations

Begin reconnaissance with safe, read-only commands:
2

Use Dry Run for Testing

Test command syntax before execution:
3

Document Your Activities

Save output for analysis and documentation:
4

Clean Up After Operations

Remove any created artifacts:
5

Monitor for Detection

Be aware of potential detection points:
  • SCCM audit logs
  • Unusual WMI queries
  • Administrative role usage
  • Application deployment events
Tab Completion: SharpSCCM supports command-line tab completion with dotnet-suggest, but it’s disabled by default to avoid creating temporary files. See the command-line API documentation for more information.