mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-09-05 03:35:40 +00:00
Fix Connect-ProxmoxServer to return ProxmoxConnection instead of ProxmoxConnectionInfo
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
@{
|
@{
|
||||||
RootModule = 'PSProxmox.psm1'
|
RootModule = 'PSProxmox.psm1'
|
||||||
NestedModules = @('bin\PSProxmox.dll')
|
NestedModules = @('bin\PSProxmox.dll')
|
||||||
ModuleVersion = '2025.04.28.2025'
|
ModuleVersion = '2025.04.28.2032'
|
||||||
GUID = 'd24f0894-3d0c-4ef1-a41e-b273c3db86ad'
|
GUID = 'd24f0894-3d0c-4ef1-a41e-b273c3db86ad'
|
||||||
Author = 'PSProxmox Team'
|
Author = 'PSProxmox Team'
|
||||||
CompanyName = 'PSProxmox'
|
CompanyName = 'PSProxmox'
|
||||||
@@ -95,3 +95,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace PSProxmox.Cmdlets
|
|||||||
/// </example>
|
/// </example>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Cmdlet(VerbsCommunications.Connect, "ProxmoxServer")]
|
[Cmdlet(VerbsCommunications.Connect, "ProxmoxServer")]
|
||||||
[OutputType(typeof(ProxmoxConnectionInfo))]
|
[OutputType(typeof(ProxmoxConnection))]
|
||||||
public class ConnectProxmoxServerCmdlet : PSCmdlet
|
public class ConnectProxmoxServerCmdlet : PSCmdlet
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -108,7 +108,8 @@ namespace PSProxmox.Cmdlets
|
|||||||
Realm,
|
Realm,
|
||||||
this);
|
this);
|
||||||
|
|
||||||
WriteObject(ProxmoxConnectionInfo.FromConnection(connection));
|
// Return the actual connection object instead of the connection info
|
||||||
|
WriteObject(connection);
|
||||||
SessionState.PSVariable.Set(new PSVariable("ProxmoxConnection", connection, ScopedItemOptions.Private));
|
SessionState.PSVariable.Set(new PSVariable("ProxmoxConnection", connection, ScopedItemOptions.Private));
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in New Issue
Block a user