Add column to content type using PS

I'm looking for a script that will look through all existing libraries in a web application, find the ones that have a content type of document set and add a column to them.
Column name: pType
Column type: Single line of text
Column default value: doc

The libraries I am interested in were not created using the custom document library template but one that we created and template. So the script would need to look for this library type (if possible?)

Also, the document set in the libraries will have had their name changed from the default "document set"
LVL 29
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jamie McAllister MVPSharePoint ConsultantCommented:
There's some PS listed here;

It would need a loop adding to look at all libraries, but aside from that seems to do the job.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SharePoint

From novice to tech pro — start learning today.