feat: add cmdlet aliases for common operations

Aliases: cpve (Connect), dpve (Disconnect), gpvm (Get-PveVm),
gpct (Get-PveContainer), gpn (Get-PveNode), gpvs (Get-PveStorage),
gpt (Get-PveTask). AliasesToExport added to manifest.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Clint Branham
2026-03-20 12:31:55 -05:00
parent de400e159c
commit dec8f2d4d7
8 changed files with 20 additions and 1 deletions
@@ -14,6 +14,7 @@ namespace PSProxmoxVE.Cmdlets.Connection
/// </summary>
[Cmdlet(VerbsCommunications.Connect, "PveServer",
DefaultParameterSetName = ParameterSetCredential)]
[Alias("cpve")]
[OutputType(typeof(PveSession))]
public sealed class ConnectPveServerCmdlet : PSCmdlet
{
@@ -16,6 +16,7 @@ namespace PSProxmoxVE.Cmdlets.Connection
/// </summary>
[Cmdlet(VerbsCommunications.Disconnect, "PveServer",
SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.Low)]
[Alias("dpve")]
public sealed class DisconnectPveServerCmdlet : PSCmdlet
{
protected override void ProcessRecord()
@@ -14,6 +14,7 @@ namespace PSProxmoxVE.Cmdlets.Containers
/// </para>
/// </summary>
[Cmdlet(VerbsCommon.Get, "PveContainer")]
[Alias("gpct")]
[OutputType(typeof(PveContainer))]
public sealed class GetPveContainerCmdlet : PveCmdletBase
{
@@ -16,6 +16,7 @@ namespace PSProxmoxVE.Cmdlets.Nodes
/// </para>
/// </summary>
[Cmdlet(VerbsCommon.Get, "PveNode")]
[Alias("gpn")]
[OutputType(typeof(PveNode))]
public sealed class GetPveNodeCmdlet : PveCmdletBase
{
@@ -13,6 +13,7 @@ namespace PSProxmoxVE.Cmdlets.Storage
/// </para>
/// </summary>
[Cmdlet(VerbsCommon.Get, "PveStorage")]
[Alias("gpvs")]
[OutputType(typeof(PveStorage))]
public class GetPveStorageCmdlet : PveCmdletBase
{
@@ -13,6 +13,7 @@ namespace PSProxmoxVE.Cmdlets.Tasks
/// </para>
/// </summary>
[Cmdlet(VerbsCommon.Get, "PveTask")]
[Alias("gpt")]
[OutputType(typeof(PveTask))]
public class GetPveTaskCmdlet : PveCmdletBase
{
@@ -14,6 +14,7 @@ namespace PSProxmoxVE.Cmdlets.Vms
/// </para>
/// </summary>
[Cmdlet(VerbsCommon.Get, "PveVm")]
[Alias("gpvm")]
[OutputType(typeof(PveVm))]
public sealed class GetPveVmCmdlet : PveCmdletBase
{
+13 -1
View File
@@ -27,6 +27,9 @@
# Copyright statement for this module
Copyright = '(c) 2026 goodolclint. All rights reserved.'
# URI for online help
HelpInfoUri = 'https://github.com/goodolclint/PSProxmoxVE/tree/main/docs/cmdlets'
# Description of the functionality provided by this module
Description = 'PowerShell module for managing Proxmox VE environments. Supports PVE 8.x and 9.x with full VM, container, storage, network, and cluster management capabilities.'
@@ -88,6 +91,7 @@
'Stop-PveContainer',
'Restart-PveContainer',
'Copy-PveContainer',
'Move-PveContainer',
'Get-PveContainerConfig',
'Set-PveContainerConfig',
# Container Snapshots (4)
@@ -171,7 +175,15 @@
VariablesToExport = @()
# Aliases to export from this module
AliasesToExport = @()
AliasesToExport = @(
'cpve',
'dpve',
'gpvm',
'gpct',
'gpn',
'gpvs',
'gpt'
)
# Private data to pass to the module specified in RootModule
PrivateData = @{