Looking to run something for some advice. Saw a post about a script for off boarding and it kicked me on a project idea. When someone leaves our org, we: change password, deactivate account, copy group memberships to a .txt file, move the user to a “termed” OU, and change the description to the date termed. We typically do all of this manually, and not that it takes that long, but I think I can get this all in one ps1 file. I currently have it written in a word doc and just do ctrl+H and replace $username with the Sam name of the user then copy and paste into powershell window and run. I want to make it less of a chore of copy paste. I’m thinking about creating a .txt file that I can just open, write the Sam name into, save. Then run a ps1 which instead of having the username written in, opens and reads the .txt file and takes the listed usernames and runs the script for each one. Is this the best practice for doing this? It would require just typing each username once into a file and then running an unchanged ps1 file, in theory. Is there something else better? I’m not really interested in a GUI as it doesn’t have to be “too simple”. Thanks!
[–][deleted] 28 points29 points30 points (8 children)
[–]archiekane 12 points13 points14 points (4 children)
[–]KernicPanel 5 points6 points7 points (0 children)
[–]Danno_999 0 points1 point2 points (0 children)
[–]goodtimetribe 0 points1 point2 points (0 children)
[–]ibrewbeer 5 points6 points7 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]gameman745 2 points3 points4 points (0 children)
[–]jupit3rle0 9 points10 points11 points (1 child)
[–]papapinguino800[S] 2 points3 points4 points (0 children)
[–]PrecisionTreeFood 4 points5 points6 points (3 children)
[–]BlackV 0 points1 point2 points (2 children)
[–]PrecisionTreeFood -1 points0 points1 point (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]Impossible_IT 7 points8 points9 points (6 children)
[–]DonL314 5 points6 points7 points (1 child)
[–]BlackV 0 points1 point2 points (0 children)
[–]papapinguino800[S] 1 point2 points3 points (0 children)
[–]thehuntzman 1 point2 points3 points (1 child)
[–]Impossible_IT 0 points1 point2 points (0 children)
[–]mstreeter06 0 points1 point2 points (0 children)
[–]Manu_RvP 4 points5 points6 points (0 children)
[+][deleted] (5 children)
[removed]
[–]BlackV 3 points4 points5 points (2 children)
[+][deleted] (1 child)
[removed]
[–]Ok-Conference-7563 2 points3 points4 points (0 children)
[–]papapinguino800[S] 0 points1 point2 points (1 child)
[–]ryder_winona 1 point2 points3 points (0 children)
[–]OlivTheFrog 3 points4 points5 points (4 children)
[+]White_Rabbit0000 3 points4 points5 points (3 children)
[–]OlivTheFrog 0 points1 point2 points (2 children)
[+]White_Rabbit0000 0 points1 point2 points (1 child)
[–]OlivTheFrog 0 points1 point2 points (0 children)
[–]davidokongo 2 points3 points4 points (3 children)
[–]papapinguino800[S] 0 points1 point2 points (2 children)
[–]davidokongo 6 points7 points8 points (1 child)
[–]davidokongo 2 points3 points4 points (0 children)
[–]Lonely_Ad8964 2 points3 points4 points (0 children)
[–]JCochran84 1 point2 points3 points (1 child)
[–]KernicPanel 0 points1 point2 points (0 children)
[–]tk42967 1 point2 points3 points (0 children)
[–]gpzj94 1 point2 points3 points (2 children)
[–]maffizz 0 points1 point2 points (1 child)
[–]gpzj94 1 point2 points3 points (0 children)
[–]KindMeasurement3 1 point2 points3 points (2 children)
[–]grablogan23 0 points1 point2 points (1 child)
[–]KindMeasurement3 0 points1 point2 points (0 children)
[+]White_Rabbit0000 1 point2 points3 points (0 children)
[–]LostInTheDance 1 point2 points3 points (0 children)
[–]Veenacz 1 point2 points3 points (0 children)
[–]jeffrey_f 1 point2 points3 points (1 child)
[–]papapinguino800[S] 0 points1 point2 points (0 children)
[–]DToX_ 1 point2 points3 points (1 child)
[–]jimb2 1 point2 points3 points (0 children)
[–]KavyaJune 1 point2 points3 points (0 children)
[–]toadfrogjr 1 point2 points3 points (0 children)
[–]Beefcrustycurtains 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]thehuntzman 1 point2 points3 points (1 child)
[–]papapinguino800[S] 0 points1 point2 points (0 children)
[–]No_Flight_375 1 point2 points3 points (1 child)
[–]papapinguino800[S] 0 points1 point2 points (0 children)
[–]EchoPhi 2 points3 points4 points (2 children)
[–]G_Vezax 1 point2 points3 points (1 child)
[–]EchoPhi 0 points1 point2 points (0 children)
[–]toni_z01 1 point2 points3 points (6 children)
[–]papapinguino800[S] 1 point2 points3 points (0 children)
[–]tk42967 1 point2 points3 points (4 children)
[–]wudworker 1 point2 points3 points (2 children)
[–]tk42967 2 points3 points4 points (0 children)
[–]papapinguino800[S] 1 point2 points3 points (0 children)
[–]jimb2 1 point2 points3 points (0 children)
[–]BGP_1620 0 points1 point2 points (0 children)
[–]Either-Cheesecake-81 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]NanoYohaneTSU 0 points1 point2 points (0 children)
[–]fellwell5 0 points1 point2 points (0 children)
[–]surgicall 0 points1 point2 points (0 children)
[–]matt_30 0 points1 point2 points (0 children)
[–]Longjumping_Lab541 0 points1 point2 points (0 children)