From 8d5f801f9e7af7985ff65cb6f5d5af70709d1e76 Mon Sep 17 00:00:00 2001 From: Peter Ombwa Date: Thu, 18 Feb 2021 18:25:20 -0800 Subject: [PATCH] Add rename directive to duplicate device management cmdlets. --- .../DeviceManagement.Actions/readme.md | 26 +++++++++++++++++++ .../DeviceManagement.Administration/readme.md | 18 +++++++++++++ .../DeviceManagement.Functions/readme.md | 24 +++++++++++++++++ .../DeviceManagement/readme.md | 10 +++++++ 4 files changed, 78 insertions(+) diff --git a/src/DeviceManagement.Actions/DeviceManagement.Actions/readme.md b/src/DeviceManagement.Actions/DeviceManagement.Actions/readme.md index 2656a25175c..7c47176bbe5 100644 --- a/src/DeviceManagement.Actions/DeviceManagement.Actions/readme.md +++ b/src/DeviceManagement.Actions/DeviceManagement.Actions/readme.md @@ -41,6 +41,16 @@ directive: # Remove invalid paths that exceed Windows file name limit. - remove-path-by-operation: ^deviceManagement.(deviceShellScripts.userRunStates.deviceRunStates.managedDevice_.*|windowsAutopilotDeploymentProfiles.(assignedDevices_updateDeviceProperties|assignedDevices.deploymentProfile_assign|assignedDevices.intendedDeploymentProfile_assign|assignedDevices_assignResourceAccountToDevice|assignedDevices_unassignResourceAccountFromDevice)|deviceComplianceScripts.deviceRunStates.managedDevice_.*|deviceCustomAttributeShellScripts.(deviceRunStates.managedDevice_.*|userRunStates.deviceRunStates.managedDevice_.*)|deviceManagementScripts.deviceRunStates.managedDevice(_updateWindowsDeviceAccount|_logoutSharedAppleDeviceActiveUser|_deleteUserFromSharedAppleDevice|_createDeviceLogCollectionRequest|_sendCustomNotificationToCompanyPortal|_triggerConfigurationManagerAction|_windowsDefenderUpdateSignatures)|deviceManagementScripts.userRunStates.deviceRunStates.managedDevice_.*|deviceConfigurations.groupAssignments.deviceConfiguration(_assignedAccessMultiModeProfiles|_windowsPrivacyAccessControls)|deviceHealthScripts.deviceRunStates.managedDevice(_sendCustomNotificationToCompanyPortal|_createDeviceLogCollectionRequest)|deviceShellScripts.deviceRunStates.managedDevice_sendCustomNotificationToCompanyPortal)$ +# Remove cmdlets. + - where: + verb: New + subject: ^DeviceManagementComanagedDeviceLogCollectionRequest$ + remove: true + - where: + verb: Update + subject: ^DeviceManagementComanagedDevice.* + remove: true + # Rename cmdlets. - where: verb: Get @@ -56,6 +66,22 @@ directive: set: verb: Invoke subject: $1WindowsPrivacyAccessControl + - where: + verb: Update + subject: ^(DeviceManagementGroupPolicyConfiguration)(DefinitionValue)$ + set: + subject: $1Multiple$2 + - where: + verb: Update + subject: ^(DeviceManagementIntent)(Setting)$ + set: + subject: $1Multiple$2 + - where: + verb: Update + subject: ^(DeviceManagementManagedDevice)$ + set: + verb: New + subject: $1WindowsDefenderUpdateSignature ``` ### Versioning diff --git a/src/DeviceManagement.Administration/DeviceManagement.Administration/readme.md b/src/DeviceManagement.Administration/DeviceManagement.Administration/readme.md index 307855839b0..acac58401ec 100644 --- a/src/DeviceManagement.Administration/DeviceManagement.Administration/readme.md +++ b/src/DeviceManagement.Administration/DeviceManagement.Administration/readme.md @@ -31,6 +31,24 @@ require: title: $(service-name) subject-prefix: '' ``` + +### Directives + +> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md + +``` yaml +directive: +# Remove cmdlets. + - where: + verb: New + subject: ^DeviceManagementGroupPolicyMigrationReport$ + remove: true + - where: + verb: Remove + subject: ^DeviceManagementGroupPolicyUploadedDefinitionFile$ + remove: true +``` + ### Versioning ``` yaml diff --git a/src/DeviceManagement.Functions/DeviceManagement.Functions/readme.md b/src/DeviceManagement.Functions/DeviceManagement.Functions/readme.md index 6bea5234c18..df57b00ad66 100644 --- a/src/DeviceManagement.Functions/DeviceManagement.Functions/readme.md +++ b/src/DeviceManagement.Functions/DeviceManagement.Functions/readme.md @@ -31,6 +31,30 @@ require: title: $(service-name) subject-prefix: '' ``` + +### Directives + +> see https://github.com/Azure/autorest/blob/master/docs/powershell/directives.md + +``` yaml +directive: +# Rename cmdlets. + - where: + subject: ^(DeviceManagement(Condition|ConditionStatementManagementCondition|ConditionStatementManagementConditionStatement))$ + set: + subject: $1ForPlatform + - where: + subject: ^(DeviceManagementRoleScopeTag)$ + variant: ^Get$ + set: + subject: $1ById + - where: + subject: ^(DeviceManagementRoleScopeTag)$ + variant: ^Get1$|^GetViaIdentity$ + set: + subject: $1ByResource +``` + ### Versioning ``` yaml diff --git a/src/DeviceManagement/DeviceManagement/readme.md b/src/DeviceManagement/DeviceManagement/readme.md index 55415e71fe0..834fefe86b2 100644 --- a/src/DeviceManagement/DeviceManagement/readme.md +++ b/src/DeviceManagement/DeviceManagement/readme.md @@ -41,6 +41,16 @@ directive: # Remove invalid paths. - remove-path-by-operation: ^deviceManagement.(deviceManagementScripts.userRunStates.deviceRunStates_SetRefManagedDevice|groupPolicyConfigurations.definitionValues.presentationValues_SetRefDefinitionValue|groupPolicyConfigurations.definitionValues.presentationValues_SetRefPresentation|deviceShellScripts.userRunStates.deviceRunStates_SetRefManagedDevice)$ +# Remove cmdlets. + - where: + verb: New + subject: subject: ^DeviceManagement(Managed|Comanaged)DeviceLogCollectionRequest$ + remove: true + - where: + verb: Update + subject: subject: ^DeviceManagementComanagedDevice$ + remove: true + # Rename cmdlets. - where: subject: ^(DeviceManagementUserExperienceAnalyticAppHealthApplicationPerformance)$