Devops organizations

%3CLINGO-SUB%20id%3D%22lingo-sub-2941592%22%20slang%3D%22en-US%22%3EDevops%20organizations%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2941592%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20working%20with%20a%20company%20that%20uses%20Azure%20AD%20and%20has%20many%20Devops%20organizations.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20do%20a%20cleanup%20as%20the%20majority%20of%20the%20Devops%20organizations%20were%20created%20by%20accident.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20an%20account%20defined%20in%20Azure%20AD%20for%20which%20I%20can%20assign%20any%20rights.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20find%20all%20the%20Devops%20organzations%20that%20exist%20that%20do%20not%20have%20any%20projects%20defined.%3C%2FP%3E%3CP%3ECurrently%2C%20I%20am%20able%20to%20get%20a%20list%20of%20all%20the%20existing%20devops%20organizations%20that%20exist%2C%20as%20well%20as%20the%20organization%20owner.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20not%20certain%20if%20there%20is%20a%20way%20to%20extract%20and%20see%20if%20any%20projects%20exist%20for%20the%20list%20of%20organizations%20that%20I%20have%20available.%3C%2FP%3E%3CP%3EWhat%20I%20would%20like%20to%20do%20is%20%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFrom%20the%20list%20of%20organizations%2C%20determine%20which%20organization%20(within%20devops)%20have%20no%20projects%20defined.%20If%20an%20organization%20has%20not%20project%20defined%2C%20then%20delete%20the%20organization.%20I%20would%20like%20to%20have%20this%20automated%2C%20and%20was%20wondering%20if%20it%20is%20possible%20to%20do%20this%20sort%20of%20task%20with%20powershell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMark%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello,

 

I am working with a company that uses Azure AD and has many Devops organizations.

 

I would like to do a cleanup as the majority of the Devops organizations were created by accident.

 

I have an account defined in Azure AD for which I can assign any rights.

 

I would like to find all the Devops organzations that exist that do not have any projects defined.

Currently, I am able to get a list of all the existing devops organizations that exist, as well as the organization owner. 

 

I am not certain if there is a way to extract and see if any projects exist for the list of organizations that I have available.

What I would like to do is :

 

From the list of organizations, determine which organization (within devops) have no projects defined. If an organization has not project defined, then delete the organization. I would like to have this automated, and was wondering if it is possible to do this sort of task with powershell.

 

Thanks in advance.

 

Mark

1 Reply

Hi, @mbuddd  Better avoid automating this cleanup because anyways you will be using this for once.