PowerShell module reference

The CloudGrangePS module manages CloudGrange resources from PowerShell 7.0 or later. It targets the platform REST API and returns typed objects. The module is at version 0.1.0 — an initial scaffold in which the connection cmdlets are the first fully implemented surface; the remaining cmdlets follow the same pattern.

CloudGrange is in preview, not GA. The cmdlet surface below reflects current code in cloudgrange-powershell and may change during the preview. See current product and release status.

Connect

All cmdlets operate against a session established by Connect-CloudGrange, which stores context in a module-scoped variable. Authentication defaults to the OAuth device-code flow; a bearer token or basic credentials (dev/test only) are alternatives.

Connect-CloudGrange -Server https://cloudgrange.contoso.com
Get-CGCluster

Cmdlets

Connection

Cmdlet Description
Connect-CloudGrange Authenticate to a server and store session context. Parameters: -Server (required), -Org, -Token, -Credential.
Disconnect-CloudGrange Clear the current session context.
Get-CloudGrangeContext Return the active session context.
Test-CloudGrangeConnection Verify connectivity to the server.

Clusters

Cmdlet Description
Get-CGCluster [-Name <name>] List clusters, or get a single cluster by name. Calls GET /api/v1/clusters.
Get-CGNode List nodes in a cluster.
Add-CGNode Add a node to a cluster.
Remove-CGNode Remove a node from a cluster.

Deployment

Cmdlet Description
New-CGDeploymentPlan Create a deployment plan.
Invoke-CGDeployment Execute a deployment.
Get-CGDeploymentStatus Get deployment status.

Module management

Cmdlet Description
Get-CGModule List installed modules.
Get-CGModuleCatalog List modules in the published catalog.
Install-CGModule Install a module.
Enable-CGModule Enable a module.
Disable-CGModule Disable a module.
Remove-CGModule Remove a module.

Agents

Cmdlet Description
Get-CGAgent List registered agents.
Register-CGAgent Register an agent.
Remove-CGAgent Remove an agent.

Jobs

Cmdlet Description
Watch-CGJob Watch a job until it reaches a terminal state.

Platform updates

Cmdlet Description
Get-CloudGrangePlatformUpdate Check for available platform updates.
Update-CloudGrange Apply a platform update.

See current product and release status.