Avatar of MilesLogan
MilesLoganFlag for United States of America

asked on 

Delete multiple accounts from AD wiht Powershell

Hi EE

Does anyone have a script they can share that will delete AD accounts that I have on a text file ?
I want to enter the SamAccountname to the text file and the script delete those AD accounts .

Thank you !
Powershell

Avatar of undefined
Last Comment
Jason Crawford
ASKER CERTIFIED SOLUTION
Avatar of Jason Crawford
Jason Crawford
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of MilesLogan
MilesLogan
Flag of United States of America image

ASKER

I was close lol !

I was missing this ... -Confirm:$false

thank you
Glad I could help.  Take care
User generated image
Powershell
Powershell

Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.

27K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo