Questions tagged [adsi]

Active Directory Services Interfaces

Microsoft's implementation of LDAP, ADSI is the protocol Windows computers use to maintain a domain relationship, including groups, Organizational Units (OU's), domain controllers, etc.

268 questions
0
votes
0 answers

Cannot index into null array. (Array not null)

I've been trying to get usernames using employee numbers but have run into an issue. The code below works if I enter 1 employee number in the textbox but as soon as there is more than 1 employee number in the textbox, it throws a "cannot index into…
Tolga
  • 1
  • 1
0
votes
1 answer

How to list the memberof values of a group

Please note! I do not want to find out the user/members of a group but the groups of which a selected group is a member of. And I have this query which is accepted by the ADS as a valid question: "SELECT…
Frans
  • 3
  • 3
0
votes
1 answer

ADSI - Local disabled users list from multiple computers in a txt file

I am trying to use a text file for a list of computers to query and get a list of all active and disabled local accounts on each of them. This part is working fine for a single computer (named glm4453): ([ADSI]('WinNT://glm4453' -f…
Xtropy
  • 3
  • 3
0
votes
0 answers

Issue with ADSI script not pulling users from all groups

I have a list of groups that i need to pull back all users. I am aware due to the numbers it is restricted. I have tried adding page size but it does not work. Here is the code Get-Module ActiveDirectory - ErrorAction silentlycontinue Function…
Si14
  • 1
  • 1
0
votes
1 answer

ADsOpenObject bind unsuccessful with ADS_USE_SSL

I am trying to connect to an AD server from a computer that is outside the domain. the connection is working fine if i am trying with the flags ADS_SECURE_AUTHENTICATION | ADS_READONLY_SERVER but when i am trying to add the use_ssl flag, its…
Tom20200
  • 1
  • 1
0
votes
2 answers

Passing Alternate Credential to ADSI Commands in Powershell

I'm trying to assign permissions to AD OU's using powershell script that is supposed to create a new object of type System.Security.Principal.NTAccount and System.DirectoryServices.ActiveDirectoryAccessRule, The code I have right now is working…
0
votes
2 answers

ADSI / IIS management and ASP.NET impersonation

I'm in the process of writing a small web app that would allow me to manage several IIS installations on different servers on our network. We have no domain controller. I have written a small impersonation controller that uses the win32 api and its…
kitsune
  • 11,516
  • 13
  • 57
  • 78
0
votes
1 answer

LookupAccountSID is returning incorrect domain name

MSDN says: LookupAccountSid function returns the name of the first domain on which SID is found. If a User is migrated to domain B from domain A and we query the old SID of user by using LookupAccountSid function from any machine of domain A, we…
0
votes
1 answer

Clear cached results of Active Directory queries at domain controller

I am establishing an external trust between 2 Win2003 forests. Then i m retrieving groups names from 2nd forest domain while sitting in the domain of 1st forest. Then, i am removing the trust and doing the query again which is bringing the same…
picrodevosio
  • 41
  • 2
  • 9
0
votes
1 answer

PowerShell - How do I add a User to an AD User Group using ADSI and alternate credentials

I need to add a user to an AD Group using specific credentials and cannot figure this out.... Here's what I have so far which gives me an "unspecified error" retrieving member 'Add'. Must be done using ADSI as the AD module won't work in my…
TSchwa
  • 43
  • 7
0
votes
1 answer

AD LDS User Password Management in ADSI

I am having some issues managing users (user type pbjects) in AD LDS, specifically managing passwords. According to this article, i should be able to set password for user object by going to right click -> Reset password. If I do that, the dialog…
concentriq
  • 359
  • 2
  • 6
  • 16
0
votes
1 answer

ADSI commands causing Access Denied errors

I'm attempting to set the description attribute in ADSI via PowerShell, but keep getting "access denied". It's executing from a non-privileged user, but the user does have Write All Properties permissions over this object. With those permissions, I…
Ryvik
  • 363
  • 1
  • 3
  • 14
0
votes
1 answer

"The group name could not be found"

when i am trying to run ([adsi]"WinNT://$env:ComputerName/$Username").SetPassword($Password)command i am getting below error. The following exception occurred while retrieving member "SetPassword": "The group name could not be found." At…
suprasad
  • 1,411
  • 3
  • 18
  • 40
0
votes
1 answer

How to enumerate default groups for a user?

Default groups of a user are not mentioned in memberOf attribue in active directory. Can anyone tell how to retrieve these group for a user? Thanks
picrodevosio
  • 41
  • 2
  • 9
0
votes
1 answer

How to view all properties of an IIS site (ADSI Object)?

I have done a lot of background work on this before posting it here. I would like to discover all the IIS sites that are running in a machine using their Active Directory Service Interface (ADSI) objects. SO far, I've found programmatic methods to…
kowsikbabu
  • 499
  • 1
  • 6
  • 23