Clifton Bardwell
asked on
Create an AD Account Through a SQL Server Trigger (Possible?)
Is it possible (and please provide a tutorial) to create an Active Directory account (and, by extension an Exchange account) via code in a trigger in SQL Server 2005?
I have a database that tracks people. When a person (a record) is added to the database, I would like a trigger to fire off creating an account for that person in Active Directory (and in Exchange as well).
Is this possible, and can you post a tutorial on how to do it?
TIA
I have a database that tracks people. When a person (a record) is added to the database, I would like a trigger to fire off creating an account for that person in Active Directory (and in Exchange as well).
Is this possible, and can you post a tutorial on how to do it?
TIA
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>>Is it possible (and please provide a tutorial) to create an Active Directory account (and, by extension an Exchange account) via code in a trigger in SQL Server 2005<<
I trust you realized the code posted is using PowerShell and not T-SQL. Also, make sure you change the SQL Server startup account to a domain admin with the appropriate permissions. In general, this is not a good idea and most serious companies would not allow this.
I trust you realized the code posted is using PowerShell and not T-SQL. Also, make sure you change the SQL Server startup account to a domain admin with the appropriate permissions. In general, this is not a good idea and most serious companies would not allow this.
ASKER