Skip to content

Commit b6f23f4

Browse files
committed
Alias Invoke-GraphRequest
1 parent 505c42f commit b6f23f4

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/Authentication/Authentication/Cmdlets/InvokeGraphRequest.cs renamed to src/Authentication/Authentication/Cmdlets/InvokeMgGraphRequest.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222

2323
namespace Microsoft.Graph.PowerShell.Authentication.Cmdlets
2424
{
25-
[Cmdlet(VerbsLifecycle.Invoke, "GraphRequest", DefaultParameterSetName = Constants.UserParameterSet)]
26-
public class InvokeGraphRequest : PSCmdlet
25+
[Cmdlet(VerbsLifecycle.Invoke, "MgGraphRequest", DefaultParameterSetName = Constants.UserParameterSet)]
26+
[Alias("Invoke-GraphRequest")]
27+
public class InvokeMgGraphRequest : PSCmdlet
2728
{
2829
private readonly CancellationTokenSource _cancellationTokenSource;
2930
private readonly InvokeGraphRequestUserAgent _graphRequestUserAgent;
3031
private string _originalFilePath;
3132

32-
public InvokeGraphRequest()
33+
public InvokeMgGraphRequest()
3334
{
3435
_cancellationTokenSource = new CancellationTokenSource();
3536
_graphRequestUserAgent = new InvokeGraphRequestUserAgent(this);

src/Authentication/Authentication/Helpers/PathUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace Microsoft.Graph.PowerShell.Authentication.Helpers
1313
/// </summary>
1414
internal static class PathUtils
1515
{
16-
public static string ResolveFilePath(string filePath, InvokeGraphRequest command, bool isLiteralPath)
16+
public static string ResolveFilePath(string filePath, InvokeMgGraphRequest command, bool isLiteralPath)
1717
{
1818
string path = null;
1919
try

src/Authentication/Authentication/Helpers/StreamHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ internal static string StreamToString(this Stream stream, Encoding encoding)
7979
}
8080

8181
internal static void SaveStreamToFile(this Stream baseResponseStream, string filePath,
82-
InvokeGraphRequest invokeGraphRequest, CancellationToken token)
82+
InvokeMgGraphRequest invokeGraphRequest, CancellationToken token)
8383
{
8484
// If the web cmdlet should resume, append the file instead of overwriting.
8585
const FileMode fileMode = FileMode.Create;

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@ 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.
7575
CmdletsToExport = 'Connect-MgGraph', 'Disconnect-MgGraph', 'Get-MgContext', 'Get-MgProfile',
76-
'Select-MgProfile', 'Invoke-GraphRequest'
76+
'Select-MgProfile', 'Invoke-MgGraphRequest'
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 = @('Connect-Graph', 'Disconnect-Graph')
82+
AliasesToExport = @('Connect-Graph', 'Disconnect-Graph', 'Invoke-GraphRequest')
8383

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

0 commit comments

Comments
 (0)