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
1 answer

Issue with ADsOpenObject() remote connection and the WinNT provider

I have a problem getting an IADsContainer object from ADsOpenObject() by using the WinNT provider from a service on a remote machine. I've been able to get the code working in the following scenarios except number 4 My application is deployed on…
The Storm
  • 71
  • 8
0
votes
2 answers

Querying Service Status with ADSI - what rights are needed?

I'm using VB6 and using ADSI to query for the status (running or not) of a Windows Service. See this MS article: http://msdn.microsoft.com/en-us/library/aa746322(v=vs.85).aspx. With a user who is a member of the USERS group, I'm receiving a thrown…
MarkL
  • 1,721
  • 1
  • 11
  • 22
0
votes
1 answer

How to execute LDAP ADLDS command using cmd.exe?

We have to execute dsacls command from cmd.exe to make changes in ADLDS user's permissions. When I tried to execute through CMD I got the below error dsacls \\servername.com:6395\OU=users,DC=comp,DC=com /A /I:T /G…
user2632905
  • 237
  • 2
  • 3
  • 12
0
votes
1 answer

Active Directory - Checking Group Membership

I'm writing a permission checking scheme for a website, and want it to integrate with Active Directory. My question is how to check group membership for a specific username and group. I have the linked server, but I don't know how to query AD. I'm…
Joshua M. Moore
  • 381
  • 6
  • 20
0
votes
1 answer

What's the API to get the top domain (root domain) from any domain in the hierarchy like tree or child domain?

What's the API to get the top domain (root domain) from any domain in the hierarchy like tree or child domain? The closest I could find were GetForest or GetCurrentForest but that's not what I am looking…
SunMan
  • 214
  • 1
  • 12
0
votes
0 answers

Changing the Caption of an AD-User in the AD-Management Console with VB.NET

I have a working code for creating a new AD user along with its distinct properties. The only thing I can't get to work is: The users entry in the AD-Management window (caption) is the same as the CN. But I need the entry to be the same as the…
Zeh Kah
  • 1
  • 2
0
votes
0 answers

DirectoryEntry.CommitChanges() Lock

I'm having an issue concerning a write operation on a Active Directory Server, sometimes (1% of all operations) when i CommitChanges() on a DirectoryEntry i have a lock situation. I have a dump of my process that has the following output: enter…
0
votes
1 answer

Unable to get properties(e.g.Name,Path) from User [ADSI ] in Windows 7 Ultimate

I am new to Powershell. I am trying to find out all local/domain users under all the local groups from different Windows machines. I found below script for this purpose. When I run this script in Windows 7 Ultimate, it does not get any member…
Rana9999
  • 1
  • 1
0
votes
2 answers

Issues with [ADSI]::Exists

I'm trying to figure out if a user exists before I attempt to delete it. I found this command and tried to implement it into my script. I notice however, that the command will return true any username I typed into it, whether it exist or not. Can…
Lotzi11
  • 477
  • 1
  • 13
  • 26
0
votes
1 answer

ADSI Edit failed to create object from extended schema with error 'An invalid directory pathname was passed' 80005000

So I have been trying to get AD LDS to work, I had an earlier question the solution of which is to extend the schema which I solved. So I tried to create a new computer object and I got the error. Operation failed. Error code: An invalid…
S Meaden
  • 8,050
  • 3
  • 34
  • 65
0
votes
1 answer

Getting Output of ADSI Command in Powershell

I'm trying to delete some local administrator users on multiple computers. Here is the script I used and it works: Import-Csv c:/input.csv | ForEach-Object { ([ADSI]"WinNT://$($_.ComputerName)").Invoke("Delete", "user", $_.Username) } The…
0
votes
2 answers

Simple LDAP Query Returning nothing with multiple CN selection

If I run this it returns properly: $DirSearcher = New-Object System.DirectoryServices.DirectorySearcher([adsi]'') $DirSearcher.Filter = '(&(objectClass=Computer) (cn=*dc*))' $DirSearcher.FindAll().GetEnumerator() | sort-object { $_.Properties.name }…
onefiscus
  • 129
  • 1
  • 3
  • 15
0
votes
1 answer

Trying to get users in Active Directory using LDAP showing only distinguishedName and Path

I am trying to retrieve a set of users available in Active Directory using LDAP with PowerShell, but I am only getting the response shown below: [adsi]'LDAP://DomainController.com/DC=DomainName,DC=com' And it successfully executes with just the two…
Jijo Nair
  • 828
  • 2
  • 11
  • 30
0
votes
1 answer

Variables within ADSI command on remote PowerShell target

I'm automating changing passwords on remote PowerShell targets using an ADSI command I send through Invoke-Command. I'm using the following PowerShell command to send the ADSI command to the remote machine: Invoke-Command -ComputerName $computer…
broncomz1
  • 23
  • 3
0
votes
2 answers

Using an Imported TLB - "Types of Actual and Formal Var parameters must be identical" error

I am having issues using an imported type library in Delphi 2010 and cannot for the life of me get my head around how to fix it. ActiveDs_TLB defines the following: function SetSearchPreference(var pSearchPrefs: ads_searchpref_info; dwNumPrefs:…
Mark Robinson
  • 943
  • 9
  • 26