GcePSSession
1.0.9
PowerShell remoting sessions for Google Cloud Engine (GCE) VM instances using IAP Tunnel. Note: New-GcePSSession requires PowerShell 6.0+ for SSH remoting support.
Minimum PowerShell version
3.0
Installation Options
Owners
Copyright
(c) 2025 Roger Wood. All rights reserved.
Package Details
Author(s)
- Roger Wood
Tags
GCP GCE IAP PSRemoting GoogleCloud Google Cloud SSH Tunnel Remote
Functions
New-GcePSSession Remove-GcePSSession Set-GcePSSession
Dependencies
This module has no dependencies.
Release Notes
Version 1.0.9 - New features
Changes:
- Added Set-GcePSSession function to manage configuration file
- Set-GcePSSession allows users to set default KeyFilePath and UserName values
- Configuration file is automatically created as hidden if it doesn't exist
- Only specified parameters are updated, preserving existing values
- Improves user experience by providing a convenient way to configure defaults
Version 1.0.8 - New features
Changes:
- Added support for JSON config file fallback for KeyFilePath and UserName parameters
- New-GcePSSession now reads from $env:USERPROFILE\.GcePSSession.json if parameters are not provided
- Config file values are only used when parameters are not explicitly specified
- Improves usability by allowing default credentials to be configured per user
Version 1.0.7 - Bug fixes
Changes:
- Fixed double-quoting issue in gcloud path handling for -File parameter
- Removed double-quoting of paths in arguments array
- Paths are now only quoted when building the final arguments string
- Prevents "Illegal characters in path" errors when paths contain spaces
Version 1.0.6 - Bug fixes
Changes:
- Fixed SSH permissions function to use SecurityIdentifier object directly
- Resolved "Some or all identity references could not be translated" error
- Improved access rule removal to avoid modification during iteration
Version 1.0.5 - Bug fixes
Changes:
- Fixed SSH config file permissions for OpenSSH on Windows
- Added automatic permission correction for .ssh directory and config file
- Sets proper owner and ACL to prevent "Bad permissions" errors
- Disables inheritance to meet OpenSSH strict permission requirements
Version 1.0.4 - Bug fixes and improvements
Changes:
- Fixed gcloud path quoting for paths with spaces in directory names
- Improved command-line argument quoting for both -File and -Command execution
- Enhanced module loading to track successfully loaded functions
- Added verification that functions exist before exporting
- Updated module description to note PowerShell 6.0+ requirement
Version 1.0.3 - Bug fixes
Changes:
- Fixed handling of gcloud paths with spaces in directory names
- Improved path quoting for PowerShell script execution
Version 1.0.2 - Refactoring and improvements
Changes:
- Moved Install-GceWindowsSsh to standalone script (no longer part of module)
- Script can now be downloaded and run directly on Windows VMs
- Updated documentation and build scripts
Version 1.0.1 - Bug fixes and improvements
Changes:
- Removed Invoke-GceCommandAs function (use New-GcePSSession with Invoke-Command instead)
- Updated copyright and author information
- Fixed module manifest metadata
- Updated repository URLs
Version 1.0.0 - Initial release
Features:
- Create PowerShell remoting sessions to GCE Windows VMs via IAP tunnels
- Install and configure SSH server on Windows VMs
- Automatic tunnel management and cleanup
- Support for SSH key and credential authentication
FileList
- GcePSSession.nuspec
- GcePSSession.psd1
- GcePSSession.psm1
- Private\New-GceSshTunnel.ps1
- Private\Stop-GceSshTunnel.ps1
- Public\New-GcePSSession.ps1
- Public\Remove-GcePSSession.ps1
- Public\Set-GcePSSession.ps1
Version History
| Version | Downloads | Last updated |
|---|---|---|
| 1.0.13 | 8 | 11/13/2025 |
| 1.0.12 | 5 | 11/13/2025 |
| 1.0.11 | 5 | 11/13/2025 |
| 1.0.10 | 4 | 11/10/2025 |
| 1.0.9 (current version) | 5 | 11/7/2025 |
| 1.0.8 | 5 | 11/7/2025 |
| 1.0.7 | 5 | 11/7/2025 |
| 1.0.6 | 5 | 11/7/2025 |
| 1.0.5 | 5 | 11/7/2025 |
| 1.0.4 | 5 | 11/7/2025 |
| 1.0.3 | 7 | 11/7/2025 |
| 1.0.2 | 5 | 11/7/2025 |
| 1.0.1 | 5 | 11/6/2025 |
| 1.0.0 | 3 | 11/6/2025 |