![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How do I delete an OU in Active Directory from Powershell. it's probably a stupid question but I can't seem to find info on it anywhere. Looking for a simple command in Powershell too remove a OU completely. Thanks alot, really appreachiating all the help I can get. |
My System Specs![]() |
| | #2 (permalink) |
| | RE: How do I delete an OU in Active Directory from Powershell. There isn't one. When you install PowerShell there are no cmdlets for working with AD. You will either have to script it or use the Quest AD cmdlets (better solution) and use the Remove-QADObject cmdlet -- Richard Siddaway All scripts are supplied "as is" and with no warranty PowerShell MVP Blog: http://richardsiddaway.spaces.live.com/ PowerShell User Group: http://www.get-psuguk.org.uk "Johannes L" wrote: Quote: > it's probably a stupid question but I can't seem to find info on it anywhere. > Looking for a simple command in Powershell too remove a OU completely. > Thanks alot, really appreachiating all the help I can get. |
My System Specs![]() |
| | #3 (permalink) |
| | Re: How do I delete an OU in Active Directory from Powershell. Try: $ou = [adsi] "LDAP://ou=ouName,dc=domain,dc=com" $ou.psbase.deleteTree() --- Shay Levi $cript Fanatic http://scriptolog.blogspot.com Quote: > it's probably a stupid question but I can't seem to find info on it > anywhere. > Looking for a simple command in Powershell too remove a OU completely. > Thanks alot, really appreachiating all the help I can get. |
My System Specs![]() |
| | #4 (permalink) |
| | Re: How do I delete an OU in Active Directory from Powershell. Thanks Mr. Levi, that's the syntaks I was looking for! !"Shay Levi" wrote: Quote: > > > Try: > > $ou = [adsi] "LDAP://ou=ouName,dc=domain,dc=com" > $ou.psbase.deleteTree() > > > --- > Shay Levi > $cript Fanatic > http://scriptolog.blogspot.com > Quote: > > it's probably a stupid question but I can't seem to find info on it > > anywhere. > > Looking for a simple command in Powershell too remove a OU completely. > > Thanks alot, really appreachiating all the help I can get. > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Access Active directory with sql server in powershell | PowerShell | |||
| Making changes to Active Directory with Powershell | PowerShell | |||
| PowerShell Active Directory Groups_Users Issue. | PowerShell | |||
| Powershell & Active Directory | PowerShell | |||
| Active Directory support in PowerShell | PowerShell | |||