Listing specific OUs for context menu

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 4 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Listing specific OUs for context menu

Post by jvierra »

StillLearning wrote: Tue Mar 20, 2018 5:13 pm
jvierra wrote: Tue Mar 20, 2018 4:44 pm 63000 computers? It only returns computer objects.
~42,000 computers
You can use a searchroot to restrict the search to a single group of OUs. This is where you need to really think abut overall design. You can load 1000 or more objects in a couple of seconds.
User avatar
StillLearning
Posts: 39
Last visit: Tue Apr 10, 2018 9:39 pm

Re: Listing specific OUs for context menu

Post by StillLearning »

I’m not sure how you’re confused, I’ve basically said what I want to do multiple times and even provided a PSF that has zero downloads.

I’m sorry you’re unable to comprehend that I just want to display some OUs

Why make it harder you ask...

I want to know how to do this dynamically

I unfortunately don’t learn by reading and reading and reading, I actually need to see a similar result before the lightbulb goes off. While the examples you provided are great and very cool it’s not what I need this time.
User avatar
StillLearning
Posts: 39
Last visit: Tue Apr 10, 2018 9:39 pm

Re: Listing specific OUs for context menu

Post by StillLearning »

jvierra wrote: Tue Mar 20, 2018 5:25 pm
StillLearning wrote: Tue Mar 20, 2018 5:13 pm
jvierra wrote: Tue Mar 20, 2018 4:44 pm 63000 computers? It only returns computer objects.
~42,000 computers
You can use a searchroot to restrict the search to a single group of OUs. This is where you need to really think abut overall design. You can load 1000 or more objects in a couple of seconds.
Search root for specific OUs. That gets me started as the OUs I need are nested inside other OUs

Like stated in my OP
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Listing specific OUs for context menu

Post by jvierra »

StillLearning wrote: Tue Mar 20, 2018 5:44 pm
jvierra wrote: Tue Mar 20, 2018 5:25 pm
StillLearning wrote: Tue Mar 20, 2018 5:13 pm

~42,000 computers
You can use a searchroot to restrict the search to a single group of OUs. This is where you need to really think abut overall design. You can load 1000 or more objects in a couple of seconds.
Search root for specific OUs. That gets me started as the OUs I need are nested inside other OUs

Like stated in my OP
Then just add that and you are set. I gave you a general example. It was not intended to be a solution.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Listing specific OUs for context menu

Post by jvierra »

Here is the documentation for the adsisearcher. There are numerous examples of how to use it.

https://msdn.microsoft.com/en-us/librar ... .110).aspx
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Listing specific OUs for context menu

Post by jvierra »

This will also be helpful as you move forwards: https://www.codeproject.com/Articles/18 ... tory-via-C
User avatar
StillLearning
Posts: 39
Last visit: Tue Apr 10, 2018 9:39 pm

Re: Listing specific OUs for context menu

Post by StillLearning »

Thank you! Lots of new information for me to work through.
User avatar
StillLearning
Posts: 39
Last visit: Tue Apr 10, 2018 9:39 pm

Re: Listing specific OUs for context menu

Post by StillLearning »

.
Last edited by StillLearning on Sun Mar 25, 2018 7:28 am, edited 2 times in total.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Listing specific OUs for context menu

Post by jvierra »

Sorry but I cannot understand what you are asking. I thought you asked about moving computers to an OU. What does this have to do with that?
User avatar
StillLearning
Posts: 39
Last visit: Tue Apr 10, 2018 9:39 pm

Re: Listing specific OUs for context menu

Post by StillLearning »

You're right
This topic is 6 years and 4 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked