Answered by:
Copy a DeploymentType with Powershell

Question
-
Hello.
Here is the scenario.
I have an application that contains a deployment type. I want to create a copy of the deployment type for that application.So far I have figured out that there is actually no cmdlet that can do this but there are two other cmdlets, Get-CmDeploymentType and Add-CmDeploymentType.
Can I combine these two cmdlets to create a copy?
I have experimented a bit but it’s not that obvious how to do it, one can’t just create a variable with Get-CmDeploymentType containing the current DT and use the variable as a reference when running Add-CmDeploymentType. I suspect that you have to generate a new name and other attributs before you can use the variable as a reference then adding. But how?
After I have created a copy I will edit the requirement aswell, or maybe that should be done between get and add. I guess that depends. So bacically the difference between the two DT should be the name and requirements, and ofc other attributs like id and so on.Anyone have an idea?
toxaris
Wednesday, August 31, 2016 6:09 AM
Answers
-
Dear Sir,
It looks that no one has experience on this question.
If PowerShell command is not able to do this, I suggest to check SDK documents to see if there is other way to create such deployment type from a given object using scripts.
Configuration Manager SDK:
https://msdn.microsoft.com/en-us/library/hh442686.aspx
Best regards
Frank
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- Edited by Frank Dong Sunday, September 11, 2016 8:48 AM
- Proposed as answer by Frank Dong Sunday, September 11, 2016 8:49 AM
- Marked as answer by toxaris Monday, September 12, 2016 6:02 AM
Sunday, September 11, 2016 8:48 AM
All replies
-
Dear Sir,
It looks that no one has experience on this question.
If PowerShell command is not able to do this, I suggest to check SDK documents to see if there is other way to create such deployment type from a given object using scripts.
Configuration Manager SDK:
https://msdn.microsoft.com/en-us/library/hh442686.aspx
Best regards
Frank
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.- Edited by Frank Dong Sunday, September 11, 2016 8:48 AM
- Proposed as answer by Frank Dong Sunday, September 11, 2016 8:49 AM
- Marked as answer by toxaris Monday, September 12, 2016 6:02 AM
Sunday, September 11, 2016 8:48 AM -
I'll give it a try, thx
toxaris
Monday, September 12, 2016 6:02 AM