N2C.GuacAdmin

1.0.1

Administrative PowerShell module for Apache Guacamole 1.6.x: authentication sessions, connections, connection groups, users, user groups, sharing profiles, permissions, history, schemas, active sessions and tunnels via the Guacamole REST API, plus a Guacamole protocol (WebSocket) client.

Minimum PowerShell version

5.1

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name N2C.GuacAdmin

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name N2C.GuacAdmin

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Neon Cyber Crutches

Package Details

Author(s)

  • ahpooch

Tags

guacamole apache remote-desktop rdp ssh vnc rest administration powershell

Functions

New-GuacSession Get-GuacSession Remove-GuacSession Test-GuacSession Set-GuacDataSource Get-GuacConnection New-GuacConnection Update-GuacConnection Remove-GuacConnection Get-GuacConnectionGroup Get-GuacConnectionGroupTree New-GuacConnectionGroup Update-GuacConnectionGroup Remove-GuacConnectionGroup Get-GuacUser New-GuacUser Update-GuacUser Remove-GuacUser Set-GuacUserPassword Get-GuacUserGroup New-GuacUserGroup Update-GuacUserGroup Remove-GuacUserGroup Get-GuacSharingProfile New-GuacSharingProfile Update-GuacSharingProfile Remove-GuacSharingProfile Add-GuacPermission Remove-GuacPermission Add-GuacUserGroupMember Remove-GuacUserGroupMember Add-GuacUserGroupChildGroup Remove-GuacUserGroupChildGroup Get-GuacHistoryConnections Get-GuacHistoryUsers Get-GuacSchema Get-GuacProtocol Get-GuacActiveConnection Stop-GuacActiveConnection Get-GuacSharingCredential Get-GuacTunnel Get-GuacLanguage Get-GuacPatches Get-GuacExtension New-GuacActiveSession Send-GuacInstruction Receive-GuacInstruction Remove-GuacActiveSession

PSEditions

Desktop Core

Dependencies

This module has no dependencies.

Release Notes

1.0.1 — bug fixes

- Remove-GuacConnection: piping multiple connections now deletes all of them
 (previously only the last one was deleted because the deletion logic was in
 the end block). Deletion now occurs in the process block, operating on each
 piped object individually. (#46, #47)
- Get-GuacConnection now returns connection parameters (host, port, credentials,
 guac-* options) by fetching them from the /parameters sub-resource. Added
 new -IncludeParameters switch (default $true) to skip parameter fetching
 for better performance when listing many connections. If a user lacks
 UPDATE/ADMINISTER permission on a connection, parameter fetching fails
 silently with a Verbose message and the connection is still returned. (#48)

1.0.0 — first stable release, all 5 phases complete (163 tests green)

Phase 1 — Scaffold, transport, auth/session lifecycle
- Module layout, manifest, loader (PS 5.1 / 7.x compatible).
- Private REST transport (Invoke-GuacRest): APIError parsing, terminating
 GuacRestException on every failure, TLS 1.2 enforcement on Windows PowerShell
 5.1, proxy and client certificate plumbing, token masking in verbose output.
- New-GuacSession: POST /api/tokens with PSCredential, optional TOTP
 (SecureString), data source defaulting from the token response.
- Remove-GuacSession: DELETE /api/tokens/{token} (SupportsShouldProcess,
 ConfirmImpact High), clears module session state.
- Test-GuacSession: HEAD /api/session token validity check.
- Module session state providing a default -Session resolution
 (the -CmsSession pattern); no script-scope globals.

Phase 2 — Entity CRUD
- Connections: Get/New/Update/Remove-GuacConnection (-Name, -Protocol filters;
 ParentGroupName resolution).
- Connection groups: Get/New/Update/Remove-GuacConnectionGroup +
 Get-GuacConnectionGroupTree (hierarchical tree with Permission filtering).
- Users: Get/New/Update/Remove-GuacUser, Set-GuacUserPassword
 (-Permissions, -EffectivePermissions flags).
- User groups: Get/New/Update/Remove-GuacUserGroup + Add/Remove-GuacUserGroupMember
 + Add/Remove-GuacUserGroupChildGroup.
- Sharing profiles: Get/New/Update/Remove-GuacSharingProfile
 (PrimaryConnectionName resolution).
- Permissions: Add-GuacPermission / Remove-GuacPermission (JSON Patch RFC 6902;
 user/user-group subjects, all target kinds).
- History & schemas: Get-GuacHistoryConnections, Get-GuacHistoryUsers,
 Get-GuacSchema, Get-GuacProtocol.

Phase 3 — Active sessions, tunnels, extensions (REST)
- Get-GuacActiveConnection (ConnectionName resolution), Stop-GuacActiveConnection,
 Get-GuacSharingCredential.
- Get-GuacTunnel (read-only tunnel UUID listing).
- Get-GuacLanguage, Get-GuacPatches, Get-GuacExtension.

Phase 4 — Protocol client (interactive sessions)
- New-GuacActiveSession: opens WebSocket tunnel (guacamole subprotocol) + full
 handshake (select/args/size/audio/video/image/timezone/connect → ready).
- Send-GuacInstruction / Receive-GuacInstruction (low-level instruction pump).
- Remove-GuacActiveSession (graceful disconnect).

Phase 4.5 — Get-GuacConnectionGroupTree split (Issue #1)
- Tree retrieval extracted into dedicated Get-GuacConnectionGroupTree cmdlet;
 Get-GuacConnectionGroup simplified to flat list/get semantics.

Phase 5 — Hardening & release
- PSScriptAnalyzer strict ruleset as CI lint gate (run-lint.ps1).
- Pester v5 suite: unit tests + self-contained mock Guacamole server integration
 tests (Tests/GuacMockServer.ps1).
- Multi-data-source support (-DataSource All, per-object DataSource property,
 Set-GuacDataSource).
- Name resolution (ParentGroupName, PrimaryConnectionName, ConnectionName).
- GitHub Actions CI (lint + test + publish dry-run).

FileList

Version History

Version Downloads Last updated
1.0.1 (current version) 5 10/8/2026
1.0.0 9 10/5/2026