powershell-intune-samples icon indicating copy to clipboard operation
powershell-intune-samples copied to clipboard

Adding DeviceConfigurtion/DeviceConfiguration_Copy.ps1 script.

Open hirnidrin opened this issue 6 years ago • 1 comments

Script to bulk copy (duplicate, clone) Intune online device configuration policies.

Script asks for 2 params

  • match - regex to filter the current online policies by displayname
  • replace - regex specifying how the displayname of the copied policy shall be changed

Shows the policies that match and would be copied. You are asked to proceed or abort before the (bulk) copying happens, so you can make sure your regexes work as intended.

Example

  • match: -FOO-
  • replace: -BAR-
  • Takes all policies containing "-FOO-" in the displayname, creates copies with names where "-FOO-" is replaced by "-BAR-"

Example

  • match: ^(My DCP)$
  • replace: $1 Copy
  • Takes the policy named "My DCP", creates a copy named "My DCP Copy"

Group assignment is not copied. No local files involved, just copies online to online.

hirnidrin avatar Jun 23 '19 19:06 hirnidrin

CLA assistant check
All CLA requirements met.

msftclas avatar Jun 23 '19 19:06 msftclas