Just wondering if you have a simple script that would allow me to enter a computer name and MAC address in a form, that would automatically create the computer association and add it to a collection in SCCM 2007? I would likt to give this to technicians when building new systems instead of giving then access to the sccm console.
is there an easy way to delete all applications with dependencies and deployments?
Would be really nice if you can find a way to this with powershell.
I need this because I have to export and import my applications again.
Hi chuck,
Do you want to delete applications that have dependencies, or delete all applications and all dependencies (if the dependencies are apps then it’s kinda the same thing)?
Deleting the application will automtaically delete the deployment when you delete through the console but i dont see a method in the provider for delete. Which means you should really check relationships, delete deployments, delete revision history, and then delete the app.
A quick tip, monitor the smsprov.log on the server, then delete an application from the console. This is a good way to find out what the console actually does over the provider and give you a starting point for scripting.
Andy
Hi Andrew,
Just wondering if you have a simple script that would allow me to enter a computer name and MAC address in a form, that would automatically create the computer association and add it to a collection in SCCM 2007? I would likt to give this to technicians when building new systems instead of giving then access to the sccm console.
Hi Richard,
The method is in my post, and sapien primalforms will help create a suitable form front end.
https://andrewdcraig.wordpress.com/2011/04/15/sccm-add-computer-associations-with-powershell/
I hope this gives you enough information to create your own tool.
Regards
Andrew
Hey Andrew,
is there an easy way to delete all applications with dependencies and deployments?
Would be really nice if you can find a way to this with powershell.
I need this because I have to export and import my applications again.
Regards
Chuck
Hi chuck,
Do you want to delete applications that have dependencies, or delete all applications and all dependencies (if the dependencies are apps then it’s kinda the same thing)?
Deleting the application will automtaically delete the deployment when you delete through the console but i dont see a method in the provider for delete. Which means you should really check relationships, delete deployments, delete revision history, and then delete the app.
A quick tip, monitor the smsprov.log on the server, then delete an application from the console. This is a good way to find out what the console actually does over the provider and give you a starting point for scripting.
Andy