Skip to content
  • Home
  • About the Blog
  • About the Blogger

Just Another IT Guy

The Mad Ramblings of an Abnormal SysAdmin

Adding and Removing Active Directory OU’s with PowerShell

PowerShell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
###########
#Create OU#
###########
 
New-ADOrganizationalUnit -Name "Example" -Path "OU=Users,DC=DOMAIN,DC=LOCAL"
 
 
###########
#Delete OU#
###########
 
Get-ADOrganizationalUnit -Identity "OU=Example,OU=Users,DC=DOMAIN,DC=LOCAL" |
Set-ADObject -ProtectedFromAccidentalDeletion:$false -PassThru |
Remove-ADOrganizationalUnit -Confirm:$false

 

Posted on June 21, 2017August 15, 2018 by Scott Shelton

Post navigation

Windows 7 Not Connecting to Wired Network Prior to Login
Managing WinRM Trusted Hosts

Related articles

  • Creating Custom Address Lists with Exchange Online
    Creating Custom Address Lists with Exchange Online
  • Add SSO Support for Chrome Browser with ADFS 3
    Add SSO Support for Chrome Browser with ADFS 3
  • Schannel Event 36870 – A fatal error occurred – RDP
    Schannel Event 36870 – A fatal error occurred – RDP
June 2017
S M T W T F S
 123
45678910
11121314151617
18192021222324
252627282930  
    Jul »

Archives

Content

Active Directory ADFS AD FS Adobe Reader Apache2 Azure AD Backup Barracuda Backup Certificates ConnectWise Control DHCP DNS Elasticsearch ELK Stack Exchange Online Firmware FSMO Group Policy Hyper-V Kaspersky MDT Microsoft Office Microsoft SQL MySQL NetGear ReadyNAS Office 365 PHP Postfix PowerCLI PowerShell RDP Remote Desktop Services RSAT Sage 50 ScreenConnect SSL Ubuntu Veeam VMware VMware Tools WDS Windows 7 Windows 10 Windows Updates WSUS

RSS This Week In Enterprise Tech

  • TWiET 505: QUIC WIN with UDP 853 - Amazon & iRobot, Zero-Day Defense, DNS Security August 6, 2022
    Amazon acquires iRobot, Zero-day defense tips, DNS security, and more! Amazon acquires iRobot. Amazon & IBM are moving quickly on Post-Quantum Cryptographic Algorithms. T-Mobile store owner made $25 million using stolen employee credentials. North Korea-backed hackers with a way to read your Gmail. Zero-Day defense: tips for defusing the threat. Josh Kuo: DNSSEC Nerd for […]
    TWiT
  • TWiET 504: Azure in the Sky with Sam IAM - Container files delivering malware, cyberattacks busted by AI, cloud innovation with Azure July 29, 2022
    Container files delivering malware, cyberattacks busted by AI, cloud innovation with Azure Questions Around Massive Shanghai Police Data Breach InterPlanetary File System Phishing Attacks Apple's Virtualization framework for testing new macOS betas Sneaky malware delivery via file containers Cyberattacks that were halted by AI in 2022 Jeremy Winter, Vice President of product management at Microsoft, discusses Azure, […]
    TWiT
  • TWiET 503: Dashboard Fatigue - Google Drive malware, industrial cyberthreats, app instrumentation trends with AppDynamics July 22, 2022
    Google Drive malware, industrial cyberthreats, app instrumentation trends with AppDynamics, and more. Russian hackers behind SolarWinds are now hiding malware in Google Drive Mysterious, cloud-enabled macOS spyware blows onto the scene FBI: If you're hit by ransomware, don't forget to call us  Spyware maker Candiru linked to Chrome zero-day targeting journalists Hackers are targeting industrial […]
    TWiT

top
© 2022 Just Another IT Guy