Skip to content

Commit a85e3d6

Browse files
committed
Alias Connect & Disconnect-Graph
1 parent 21a2c68 commit a85e3d6

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

src/Authentication/Authentication/Cmdlets/ConnectGraph.cs renamed to src/Authentication/Authentication/Cmdlets/ConnectMgGraph.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ namespace Microsoft.Graph.PowerShell.Authentication.Cmdlets
1717
using System.Net;
1818
using System.Globalization;
1919

20-
[Cmdlet(VerbsCommunications.Connect, "Graph", DefaultParameterSetName = Constants.UserParameterSet)]
21-
public class ConnectGraph : PSCmdlet, IModuleAssemblyInitializer, IModuleAssemblyCleanup
20+
[Cmdlet(VerbsCommunications.Connect, "MgGraph", DefaultParameterSetName = Constants.UserParameterSet)]
21+
[Alias("Connect-Graph")]
22+
public class ConnectMgGraph : PSCmdlet, IModuleAssemblyInitializer, IModuleAssemblyCleanup
2223
{
2324
[Parameter(ParameterSetName = Constants.UserParameterSet,
2425
Position = 1,

src/Authentication/Authentication/Cmdlets/DisconnectGraph.cs renamed to src/Authentication/Authentication/Cmdlets/DisconnectMgGraph.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ namespace Microsoft.Graph.PowerShell.Authentication.Cmdlets
66
using Microsoft.Graph.PowerShell.Authentication.Helpers;
77
using System;
88
using System.Management.Automation;
9-
[Cmdlet(VerbsCommunications.Disconnect, "Graph")]
10-
public class DisconnectGraph : PSCmdlet
9+
[Cmdlet(VerbsCommunications.Disconnect, "MgGraph")]
10+
[Alias("Disconnect-Graph")]
11+
public class DisconnectMgGraph : PSCmdlet
1112
{
1213
protected override void BeginProcessing()
1314
{

src/Authentication/Authentication/Helpers/HttpHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace Microsoft.Graph.PowerShell.Authentication.Helpers
1717
public static class HttpHelpers
1818
{
1919
/// The version for current assembly.
20-
private static AssemblyName AssemblyInfo = typeof(ConnectGraph).GetTypeInfo().Assembly.GetName();
20+
private static AssemblyName AssemblyInfo = typeof(ConnectMgGraph).GetTypeInfo().Assembly.GetName();
2121

2222
/// The value for the Auth module version header.
2323
private static string AuthModuleVersionHeaderValue =

src/Authentication/Authentication/Microsoft.Graph.Authentication.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ FormatsToProcess = './Microsoft.Graph.Authentication.format.ps1xml'
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'Connect-Graph', 'Disconnect-Graph', 'Get-MgContext', 'Get-MgProfile',
75+
CmdletsToExport = 'Connect-MgGraph', 'Disconnect-MgGraph', 'Get-MgContext', 'Get-MgProfile',
7676
'Select-MgProfile', 'Invoke-GraphRequest'
7777

7878
# Variables to export from this module
7979
# VariablesToExport = @()
8080

8181
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
82-
AliasesToExport = @()
82+
AliasesToExport = @('Connect-Graph', 'Disconnect-Graph')
8383

8484
# DSC resources to export from this module
8585
# DscResourcesToExport = @()

0 commit comments

Comments
 (0)