Is it not possible to get all groups from an OU using only ADSI search? I can't use the Active Directory module as it is not installed on our users desktops.
I would love to loop through an OU and get all the groups the user is a member of.
Search found 63 matches
- Thu Mar 31, 2022 8:01 am
- Forum: PowerShell
- Topic: Get AD groups from OU using only ADSI
- Replies: 8
- Views: 1401
- Thu Feb 17, 2022 3:27 pm
- Forum: PowerShell
- Topic: Try to send email but get error
- Replies: 4
- Views: 2369
Re: Try to send email but get error
I found my problem. It is this line
If (!($Mail.ResolveAll))
Should be
If (!($Mail.Recipients.ResolveAll))
Found a bad script that had the wrong parameters in it
If (!($Mail.ResolveAll))
Should be
If (!($Mail.Recipients.ResolveAll))
Found a bad script that had the wrong parameters in it
- Thu Feb 17, 2022 3:13 pm
- Forum: PowerShell
- Topic: Try to send email but get error
- Replies: 4
- Views: 2369
Re: Try to send email but get error
Sorry, I haven't made myself clear. The line doesn't give me the error, it is the variable in that line that has the "System.__ComObject" error. but as I said doing "$myRecipient.To" it gives me the "Exception.Message" I was looking for. Now, I need to know why I can' t...
- Thu Feb 17, 2022 2:57 pm
- Forum: PowerShell
- Topic: Try to send email but get error
- Replies: 4
- Views: 2369
Re: Try to send email but get error
Hi jvierra, It never gives me a line, but in the "if then" for the Resolver it is this line $winscript.popup("`r`r Invalid Recipient Name:.`r`n`r`" $myRecipient ", 8, "Access Request - Error", 4160) - line 90 That gives the "System.__ComObject" error, but...
- Thu Feb 17, 2022 11:52 am
- Forum: PowerShell
- Topic: Try to send email but get error
- Replies: 4
- Views: 2369
Try to send email but get error
I am trying to send an email using the below function. If I send it and use the display() at the end it works just fine, email window pops up and I can click send. But if I have send() it complains the is something wrong with the names when it tries to resolve the names. I get an error message of &q...
- Tue Feb 15, 2022 9:04 am
- Forum: PowerShell
- Topic: Initializing Dictionary Arrays
- Replies: 4
- Views: 2409
Re: Initializing Dictionary Arrays
Thanks jvierra, That's what I needed. Yes, I realize the code is old, but I was handed this code from a predecessor and just trying to work out a bug. We aren't quite using it like the author suggests so using his examples won't work for us. I suppose I will have to tackle the code head on if .NET g...
- Fri Feb 11, 2022 3:27 pm
- Forum: PowerShell
- Topic: Initializing Dictionary Arrays
- Replies: 4
- Views: 2409
Re: Initializing Dictionary Arrays
Sorry about that. Lets try again. I have a file with this in it [User Information] LastName=The Dog DisplayName=Goofy Then after reading the file I have $LastName = $UserContent["User Information"]["LastName"] But lets say I want to update the last name, $UserContent["User I...
- Fri Feb 11, 2022 2:31 pm
- Forum: PowerShell
- Topic: Initializing Dictionary Arrays
- Replies: 4
- Views: 2409
Initializing Dictionary Arrays
I am trying to understand "System.Collections.Specialized.OrderedDictionary" I get the concept I just don't understand how to inialize the array with no values. So this is what I have, I am reading an ini file that has info like this [User Information] LastName=The Dog DisplayName=Goofy Th...
- Wed Jan 26, 2022 12:58 pm
- Forum: PowerShell
- Topic: Loading Outlook COM Object
- Replies: 5
- Views: 2357
Re: Loading Outlook COM Object
So I guess I just had to write it out. I was trying to hard and running it in Studio while it was loaded in admin mode. Ran it outside of studio and things ran fine.
Consider this closed
Consider this closed

- Wed Jan 26, 2022 12:31 pm
- Forum: PowerShell
- Topic: Loading Outlook COM Object
- Replies: 5
- Views: 2357
Re: Loading Outlook COM Object
So, come to find out that if Outlook is open that line will fail. If Outlook is closed that line succeeds. So then leads the question as to how to load the outlook.application as a different user?