From 796c56a7fb3ff0a7fcddd662508ec9421e8dcd2f Mon Sep 17 00:00:00 2001 From: Peter Ombwa Date: Thu, 15 Oct 2020 16:14:52 -0700 Subject: [PATCH 1/4] Add stream support directives. --- config/ModulesMapping.jsonc | 4 +- src/readme.graph.md | 42 ++++++++++++ tools/Custom/FileUploadCmdlet.cs | 42 ++++++++++++ tools/Custom/PSCmdletExtensions.cs | 103 +++++++++++++++++++++++++++++ 4 files changed, 189 insertions(+), 2 deletions(-) create mode 100644 tools/Custom/FileUploadCmdlet.cs create mode 100644 tools/Custom/PSCmdletExtensions.cs diff --git a/config/ModulesMapping.jsonc b/config/ModulesMapping.jsonc index e30f63a2297..760d1a25ee3 100644 --- a/config/ModulesMapping.jsonc +++ b/config/ModulesMapping.jsonc @@ -13,7 +13,7 @@ "Files": "^drives\\.|^shares\\.|^users.drive$|^groups.drive$", "Financials": "^financials\\.", "Groups": "^groups.group$|^groups.directoryObject$|^groups.conversation$|^groups.endpoint$|^groups.extension$|^groups.resourceSpecificPermissionGrant$|^groups.profilePhoto$|^groups.conversationThread$|^groupLifecyclePolicies\\.|^users.group$|^groups.directorySetting$|^groups.Actions$|^groups.Functions$", - "Identity.DirectoryManagement": "^administrativeUnits\\.|^contacts\\.|^devices\\.|^domains\\.|^directoryRoles\\.|^directoryRoleTemplates\\.|^directorySettingTemplates\\.|^settings\\.|^subscribedSkus\\.|^contracts\\.|^directory\\.|^users.scopedRoleMembership$|^organization.organization$|^organization.organizationalBranding$|^organization.organizationSettings $|^organization.Actions$|^organization.extension$", + "Identity.DirectoryManagement": "^administrativeUnits\\.|^contacts\\.|^devices\\.|^domains\\.|^directoryRoles\\.|^directoryRoleTemplates\\.|^directorySettingTemplates\\.|^settings\\.|^subscribedSkus\\.|^contracts\\.|^directory\\.|^users.scopedRoleMembership$|^organization.organization$|^organization.organizationalBranding$|^organization.organizationSettings$|^organization.Actions$|^organization.extension$", "Identity.Governance": "^accessReviews\\.|^businessFlowTemplates\\.|^programs\\.|^programControls\\.|^programControlTypes\\.|^privilegedRoles\\.|^privilegedRoleAssignments\\.|^privilegedRoleAssignmentRequests\\.|^privilegedApproval\\.|^privilegedOperationEvents\\.|^privilegedAccess\\.|^agreements\\.|^users.agreementAcceptance$|^identityGovernance.entitlementManagement$|^identityGovernance.Functions$|^identityGovernance.Actions$", "Identity.SignIns": "^organization.certificateBasedAuthConfiguration$|^invitations\\.|^identityProviders\\.|^oauth2PermissionGrants\\.|^riskDetections\\.|^riskyUsers\\.|^dataPolicyOperations\\.|^identity.identityUserFlow$|^trustFramework\\.|^informationProtection\\.|^policies\\.|^users.authentication$|^users.informationProtection$|^identity.conditionalAccessRoot$", "Mail": "^users.inferenceClassification$|^users.mailFolder$|^users.message$", @@ -26,7 +26,7 @@ "Search": "^search\\.|^external\\.", "Security": "^Security\\.", "Sites": "^sites.site$|^sites.itemAnalytics$|^sites.columnDefinition$|^sites.contentType$|^sites.drive$|^sites.list$|^sites.sitePage$|^users.site$|^groups.site$|^sites.Functions$|^sites.Actions$", - "Teams": "^teams\\.|^chats\\.|^users.chat$|^appCatalogs$|^users.userTeamwork$|^teamwork\\.|^users.team$|^users.userTeamwork$|^groups.team$", + "Teams": "^teams\\.|^chats\\.|^users.chat$|^appCatalogs.teamsApp$|^users.userTeamwork$|^teamwork\\.|^users.team$|^groups.team$", "Users": "^users.user$|^users.directoryObject$|^users.licenseDetails$|^users.notification$|^users.outlookUser$|^users.profilePhoto$|^users.userSettings$|^users.extension$|^users.oAuth2PermissionGrant$|^users.todo$", "Users.Actions": "^users.Actions$", "Users.Functions": "^users.Functions$" diff --git a/src/readme.graph.md b/src/readme.graph.md index ce60a66c993..fe600f88f83 100644 --- a/src/readme.graph.md +++ b/src/readme.graph.md @@ -555,6 +555,48 @@ directive: return $; } +# Modify generated .cs file download cmdlets. + - from: source-file-csharp + where: $ + transform: > + if (!$documentPath.match(/generated%2Fcmdlets%2FGet\w*\d*.cs/gm)) + { + return $; + } else { + let outFileParameterRegex = /(^\s*)public\s*global::System\.String\s*OutFile\s*/gmi + if($.match(outFileParameterRegex)) { + let overrideOnOkCallRegex = /(^\s*)(overrideOnOk\(\s*responseMessage\s*,\s*response\s*,\s*ref\s*_returnNow\s*\);)/gmi + // Handle file download. + $ = $.replace(overrideOnOkCallRegex, '$1$2\n$1using(var stream = await response){ this.WriteToFile(stream, this.GetProviderPath(OutFile, false), _cancellationTokenSource.Token); _returnNow = global::System.Threading.Tasks.Task.FromResult(true);}\n$1'); + } + return $; + } + +# Modify generated .cs file upload cmdlets. + - from: source-file-csharp + where: $ + transform: > + if (!$documentPath.match(/generated%2Fcmdlets%2FSet\w*\d*.cs/gm)) + { + return $; + } else { + let streamBodyParameterRegex = /(^\s*)public\s*global::System.IO.Stream\s*BodyParameter\s*/gmi + if($.match(streamBodyParameterRegex)) { + // Replace base class with FileUploadCmdlet. + let psBaseClassImplementationRegex = /(\s*:\s*)(global::System.Management.Automation.PSCmdlet)/gmi + $ = $.replace(psBaseClassImplementationRegex, '$1Microsoft.Graph.PowerShell.Cmdlets.Custom.FileUploadCmdlet'); + + // Set bodyParameter to required to false. + let streamBodyParameterAnnotation = /(global::System\.IO\.Stream _bodyParameter;\s*\[global::System\.Management\.Automation\.Parameter\(Mandatory\s*=\s*)(true)/gmi + $ = $.replace(streamBodyParameterAnnotation, '$1false'); + + // Handle file upload. + let processRecordCallRegex = /(^\s*)(asyncCommandRuntime\.Wait\(\s*ProcessRecordAsync\s*\(\))/gmi + $ = $.replace(processRecordCallRegex, 'if (!MyInvocation.BoundParameters.ContainsKey(nameof(BodyParameter))){BodyParameter = GetFileAsStream() ?? BodyParameter;}\n$1$2'); + } + return $; + } + # Modify generated runtime TypeConverterExtensions class. - from: source-file-csharp where: $ diff --git a/tools/Custom/FileUploadCmdlet.cs b/tools/Custom/FileUploadCmdlet.cs new file mode 100644 index 00000000000..924d203de2a --- /dev/null +++ b/tools/Custom/FileUploadCmdlet.cs @@ -0,0 +1,42 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +// ------------------------------------------------------------------------------ +namespace Microsoft.Graph.PowerShell.Cmdlets.Custom +{ + using System.IO; + using System.Management.Automation; + + public partial class FileUploadCmdlet : PSCmdlet + { + /// Backing field for property. + private string _inFile; + + /// The path to the file to upload. This SHOULD include the file name and extension. + [Parameter(Mandatory = true, HelpMessage = "The path to the file to upload. This should include a path and file name. If you omit the path, the current location will be used.")] + [Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The path to the file to upload. This should include a path and file name. If you omit the path, the current location will be used.", + PossibleTypes = new[] { typeof(string) })] + [ValidateNotNullOrEmpty()] + [Category(ParameterCategory.Runtime)] + public string InFile { get => this._inFile; set => this._inFile = value; } + + /// + /// Creates a file stream from the provided input file. + /// + /// A file stream. + internal Stream GetFileAsStream() + { + if (MyInvocation.BoundParameters.ContainsKey(nameof(InFile))) + { + string resolvedFilePath = this.GetProviderPath(InFile, true); + return new FileStream(resolvedFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); + } + else + { + return null; + } + } + } +} \ No newline at end of file diff --git a/tools/Custom/PSCmdletExtensions.cs b/tools/Custom/PSCmdletExtensions.cs new file mode 100644 index 00000000000..0607e00cfbc --- /dev/null +++ b/tools/Custom/PSCmdletExtensions.cs @@ -0,0 +1,103 @@ +// ------------------------------------------------------------------------------ +// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information. +// ------------------------------------------------------------------------------ +namespace Microsoft.Graph.PowerShell +{ + using System; + using System.Collections.ObjectModel; + using System.IO; + using System.Management.Automation; + using System.Threading; + using System.Threading.Tasks; + + internal static class PSCmdletExtensions + { + /// + /// Gets a resolved or unresolved path from PSPath. + /// + /// The calling . + /// The file path to get a provider path for. + /// Determines whether get a resolved or unresolved provider path. + /// The provider path from PSPath. + internal static string GetProviderPath(this PSCmdlet cmdlet, string filePath, bool isResolvedPath) + { + string providerPath = null; + ProviderInfo provider; + try + { + var paths = new Collection(); + if (isResolvedPath) + { + paths = cmdlet.SessionState.Path.GetResolvedProviderPathFromPSPath(filePath, out provider); + } + else + { + paths.Add(cmdlet.SessionState.Path.GetUnresolvedProviderPathFromPSPath(filePath, out provider, out _)); + } + + if (provider.Name != "FileSystem" || paths.Count == 0) + { + cmdlet.ThrowTerminatingError(new ErrorRecord(new Exception("Invalid path."), string.Empty, ErrorCategory.InvalidArgument, filePath)); + } + if (paths.Count > 1) + { + cmdlet.ThrowTerminatingError(new ErrorRecord(new Exception("Multiple paths not allowed."), string.Empty, ErrorCategory.InvalidArgument, filePath)); + } + providerPath = paths[0]; + } + catch (Exception) + { + providerPath = filePath; + } + + return providerPath; + } + + /// + /// Saves a stream to a file on disk. + /// + /// The calling . + /// The stream to write to file. + /// The path to write the file to. This should include the file name and extension. + /// A cancellation token that will be used to cancel the operation by the user. + internal static void WriteToFile(this PSCmdlet cmdlet, Stream inputStream, string filePath, CancellationToken cancellationToken) + { + using (FileStream fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.Read)) + { + cmdlet.WriteToStream(inputStream, fileStream, cancellationToken); + } + } + + /// + /// Write an input stream to an output stream. + /// + /// The calling . + /// The stream to write to an output stream. + /// The stream to write the input stream to. + /// A cancellation token that will be used to cancel the operation by the user. + private static void WriteToStream(this PSCmdlet cmdlet, Stream inputStream, Stream outputStream, CancellationToken cancellationToken) + { + var copyTask = inputStream.CopyToAsync(outputStream); + var record = new ProgressRecord(000000000, "WriteRequestProgressActivity", "WriteRequestProgressStatus"); + try + { + do + { + record.StatusDescription = string.Format("Number of bytes processed {0}", outputStream.Position); + cmdlet.WriteProgress(record); + + Task.Delay(1000, cancellationToken).Wait(cancellationToken); + } while (!copyTask.IsCompleted && !cancellationToken.IsCancellationRequested); + + if (copyTask.IsCompleted) + { + record.StatusDescription = string.Format("Number of bytes processed {0}", outputStream.Position); + cmdlet.WriteProgress(record); + } + } + catch (OperationCanceledException) + { + } + } + } +} From b4fb82a52de27669f55d271208ac7bb71299a14f Mon Sep 17 00:00:00 2001 From: Peter Ombwa Date: Fri, 16 Oct 2020 11:01:39 -0700 Subject: [PATCH 2/4] Use thread safe stream. --- src/Applications/Applications/readme.md | 8 ++++++++ src/Authentication/Authentication/Common/DiskDataStore.cs | 2 +- .../Authentication/Common/ProtectedFileProvider.cs | 2 +- src/Files/Files/readme.md | 2 +- tools/Custom/FileUploadCmdlet.cs | 4 +++- tools/Custom/PSCmdletExtensions.cs | 5 +++-- 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/Applications/Applications/readme.md b/src/Applications/Applications/readme.md index 4f9c1720cd8..7a0ef89821f 100644 --- a/src/Applications/Applications/readme.md +++ b/src/Applications/Applications/readme.md @@ -38,6 +38,9 @@ subject-prefix: '' ``` yaml directive: +# Remove invalid paths. + - remove-path-by-operation: onPremisesPublishingProfiles\.(connectors\.memberOf_.*|connectors_GetMemberOf|connectorGroups\.members_.*|connectorGroups_(Get|Create|Update|Delete)Members) + # Remove cmdlets - where: verb: Test @@ -69,6 +72,11 @@ directive: subject: ^OnPremis(PublishingProfile.*)$ set: subject: OnPremise$1 +# Fix cmdlet name + - where: + subject: (^OnPremisePublishingProfileConnectorMember$) + set: + subject: $1Of ``` ### Versioning diff --git a/src/Authentication/Authentication/Common/DiskDataStore.cs b/src/Authentication/Authentication/Common/DiskDataStore.cs index 667791297e4..6331d987b51 100644 --- a/src/Authentication/Authentication/Common/DiskDataStore.cs +++ b/src/Authentication/Authentication/Common/DiskDataStore.cs @@ -11,7 +11,7 @@ namespace Microsoft.Graph.PowerShell.Authentication.Common /// /// Disk data store based on System.IO APIs. /// - internal class DiskDataStore : IDataStore + public class DiskDataStore : IDataStore { /// /// Writes the given contents to the specified file. diff --git a/src/Authentication/Authentication/Common/ProtectedFileProvider.cs b/src/Authentication/Authentication/Common/ProtectedFileProvider.cs index 4bf2514e263..599e937fbcb 100644 --- a/src/Authentication/Authentication/Common/ProtectedFileProvider.cs +++ b/src/Authentication/Authentication/Common/ProtectedFileProvider.cs @@ -22,7 +22,7 @@ public enum FileProtection /// The file can be accessed in ReadOnly or ReadWrite mode. /// This class MUST be disposed by the caller. /// - internal abstract class ProtectedFileProvider : IFileProvider, IDisposable + public abstract class ProtectedFileProvider : IFileProvider, IDisposable { protected Stream _stream; public const int MaxTries = 30; diff --git a/src/Files/Files/readme.md b/src/Files/Files/readme.md index af7eb70b7a5..a0faac5c5b7 100644 --- a/src/Files/Files/readme.md +++ b/src/Files/Files/readme.md @@ -38,7 +38,7 @@ subject-prefix: '' ``` yaml directive: - - remove-path-by-operation: .*_(Create|Get|Update|Set|Delete)Activities$|.*\.activities.*$ + - remove-path-by-operation: .*_(Create|Get|Update|Set|Delete)Activities$|.*\.activities.*$|shares\..*_createLink ``` ### Versioning diff --git a/tools/Custom/FileUploadCmdlet.cs b/tools/Custom/FileUploadCmdlet.cs index 924d203de2a..fbb11252aae 100644 --- a/tools/Custom/FileUploadCmdlet.cs +++ b/tools/Custom/FileUploadCmdlet.cs @@ -3,6 +3,7 @@ // ------------------------------------------------------------------------------ namespace Microsoft.Graph.PowerShell.Cmdlets.Custom { + using Microsoft.Graph.PowerShell.Authentication.Common; using System.IO; using System.Management.Automation; @@ -31,7 +32,8 @@ internal Stream GetFileAsStream() if (MyInvocation.BoundParameters.ContainsKey(nameof(InFile))) { string resolvedFilePath = this.GetProviderPath(InFile, true); - return new FileStream(resolvedFilePath, FileMode.Open, FileAccess.Read, FileShare.Read); + var fileProvider = ProtectedFileProvider.CreateFileProvider(resolvedFilePath, FileProtection.SharedRead, new DiskDataStore()); + return fileProvider.Stream; } else { diff --git a/tools/Custom/PSCmdletExtensions.cs b/tools/Custom/PSCmdletExtensions.cs index 0607e00cfbc..0e40fb8f783 100644 --- a/tools/Custom/PSCmdletExtensions.cs +++ b/tools/Custom/PSCmdletExtensions.cs @@ -3,6 +3,7 @@ // ------------------------------------------------------------------------------ namespace Microsoft.Graph.PowerShell { + using Microsoft.Graph.PowerShell.Authentication.Common; using System; using System.Collections.ObjectModel; using System.IO; @@ -62,9 +63,9 @@ internal static string GetProviderPath(this PSCmdlet cmdlet, string filePath, bo /// A cancellation token that will be used to cancel the operation by the user. internal static void WriteToFile(this PSCmdlet cmdlet, Stream inputStream, string filePath, CancellationToken cancellationToken) { - using (FileStream fileStream = new FileStream(filePath, FileMode.Create, FileAccess.Write, FileShare.Read)) + using (var fileProvider = ProtectedFileProvider.CreateFileProvider(filePath, FileProtection.ExclusiveWrite, new DiskDataStore())) { - cmdlet.WriteToStream(inputStream, fileStream, cancellationToken); + cmdlet.WriteToStream(inputStream, fileProvider.Stream, cancellationToken); } } From 3ca98d2321166c356b588afc6a8391be13de0952 Mon Sep 17 00:00:00 2001 From: Peter Ombwa Date: Fri, 16 Oct 2020 15:14:29 -0700 Subject: [PATCH 3/4] Update progress --- src/readme.graph.md | 9 ++++---- tools/Custom/PSCmdletExtensions.cs | 37 ++++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 14 deletions(-) diff --git a/src/readme.graph.md b/src/readme.graph.md index fe600f88f83..9375ae20a06 100644 --- a/src/readme.graph.md +++ b/src/readme.graph.md @@ -564,10 +564,11 @@ directive: return $; } else { let outFileParameterRegex = /(^\s*)public\s*global::System\.String\s*OutFile\s*/gmi - if($.match(outFileParameterRegex)) { - let overrideOnOkCallRegex = /(^\s*)(overrideOnOk\(\s*responseMessage\s*,\s*response\s*,\s*ref\s*_returnNow\s*\);)/gmi + let streamResponseRegex = /global::System\.Threading\.Tasks\.Task\s*response/gmi + if($.match(outFileParameterRegex) && $.match(streamResponseRegex)) { // Handle file download. - $ = $.replace(overrideOnOkCallRegex, '$1$2\n$1using(var stream = await response){ this.WriteToFile(stream, this.GetProviderPath(OutFile, false), _cancellationTokenSource.Token); _returnNow = global::System.Threading.Tasks.Task.FromResult(true);}\n$1'); + let overrideOnOkCallRegex = /(^\s*)(overrideOnOk\(\s*responseMessage\s*,\s*response\s*,\s*ref\s*_returnNow\s*\);)/gmi + $ = $.replace(overrideOnOkCallRegex, '$1$2\n$1using(var stream = await response){ this.WriteToFile(responseMessage, stream, this.GetProviderPath(OutFile, false), _cancellationTokenSource.Token); _returnNow = global::System.Threading.Tasks.Task.FromResult(true);}\n$1'); } return $; } @@ -592,7 +593,7 @@ directive: // Handle file upload. let processRecordCallRegex = /(^\s*)(asyncCommandRuntime\.Wait\(\s*ProcessRecordAsync\s*\(\))/gmi - $ = $.replace(processRecordCallRegex, 'if (!MyInvocation.BoundParameters.ContainsKey(nameof(BodyParameter))){BodyParameter = GetFileAsStream() ?? BodyParameter;}\n$1$2'); + $ = $.replace(processRecordCallRegex, '$1if (!MyInvocation.BoundParameters.ContainsKey(nameof(BodyParameter))){BodyParameter = GetFileAsStream() ?? BodyParameter;}\n$1$2'); } return $; } diff --git a/tools/Custom/PSCmdletExtensions.cs b/tools/Custom/PSCmdletExtensions.cs index 0e40fb8f783..9139c80e901 100644 --- a/tools/Custom/PSCmdletExtensions.cs +++ b/tools/Custom/PSCmdletExtensions.cs @@ -8,6 +8,7 @@ namespace Microsoft.Graph.PowerShell using System.Collections.ObjectModel; using System.IO; using System.Management.Automation; + using System.Net.Http; using System.Threading; using System.Threading.Tasks; @@ -58,47 +59,63 @@ internal static string GetProviderPath(this PSCmdlet cmdlet, string filePath, bo /// Saves a stream to a file on disk. /// /// The calling . + /// The HTTP response from the service. /// The stream to write to file. /// The path to write the file to. This should include the file name and extension. /// A cancellation token that will be used to cancel the operation by the user. - internal static void WriteToFile(this PSCmdlet cmdlet, Stream inputStream, string filePath, CancellationToken cancellationToken) + internal static void WriteToFile(this PSCmdlet cmdlet, HttpResponseMessage response, Stream inputStream, string filePath, CancellationToken cancellationToken) { using (var fileProvider = ProtectedFileProvider.CreateFileProvider(filePath, FileProtection.ExclusiveWrite, new DiskDataStore())) { - cmdlet.WriteToStream(inputStream, fileProvider.Stream, cancellationToken); + string downloadUrl = response?.RequestMessage?.RequestUri.ToString(); + cmdlet.WriteToStream(inputStream, fileProvider.Stream, downloadUrl, cancellationToken); } } /// - /// Write an input stream to an output stream. + /// Writes an input stream to an output stream. /// /// The calling . /// The stream to write to an output stream. /// The stream to write the input stream to. /// A cancellation token that will be used to cancel the operation by the user. - private static void WriteToStream(this PSCmdlet cmdlet, Stream inputStream, Stream outputStream, CancellationToken cancellationToken) + private static void WriteToStream(this PSCmdlet cmdlet, Stream inputStream, Stream outputStream, string downloadUrl, CancellationToken cancellationToken) { - var copyTask = inputStream.CopyToAsync(outputStream); - var record = new ProgressRecord(000000000, "WriteRequestProgressActivity", "WriteRequestProgressStatus"); + Task copyTask = inputStream.CopyToAsync(outputStream); + ProgressRecord record = new ProgressRecord( + activityId: 0, + activity: $"Downloading {downloadUrl ?? "file"}", + statusDescription: $"{outputStream.Position} of {outputStream.Length} bytes downloaded."); try { do { - record.StatusDescription = string.Format("Number of bytes processed {0}", outputStream.Position); - cmdlet.WriteProgress(record); + cmdlet.WriteProgress(GetProgress(record, outputStream)); Task.Delay(1000, cancellationToken).Wait(cancellationToken); } while (!copyTask.IsCompleted && !cancellationToken.IsCancellationRequested); if (copyTask.IsCompleted) { - record.StatusDescription = string.Format("Number of bytes processed {0}", outputStream.Position); - cmdlet.WriteProgress(record); + cmdlet.WriteProgress(GetProgress(record, outputStream)); } } catch (OperationCanceledException) { } } + + /// + /// Calculates and updates the progress record of the provided stream. + /// + /// The to update. + /// The stream to calculate its progress. + /// An updated . + private static ProgressRecord GetProgress(ProgressRecord currentProgressRecord, Stream stream) + { + currentProgressRecord.StatusDescription = $"{stream.Position} of {stream.Length} bytes downloaded."; + currentProgressRecord.PercentComplete = (int)Math.Round((double)(100 * stream.Position) / stream.Length); + return currentProgressRecord; + } } } From 830b79dcaf8c2807e482596b6b50b395c747f7e6 Mon Sep 17 00:00:00 2001 From: Peter Ombwa Date: Tue, 20 Oct 2020 08:54:41 -0700 Subject: [PATCH 4/4] Lock @autorest/powershell to version 2.1.401 --- src/readme.graph.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readme.graph.md b/src/readme.graph.md index 9375ae20a06..413b58a76f1 100644 --- a/src/readme.graph.md +++ b/src/readme.graph.md @@ -6,7 +6,7 @@ azure: false powershell: true version: latest -use: "@autorest/powershell@latest" +use: "@autorest/powershell@2.1.401" metadata: authors: Microsoft Corporation owners: Microsoft Corporation