Skip to content

Instantly share code, notes, and snippets.

@k12sysadmin
k12sysadmin / archiveuser.ps1
Created March 14, 2018 22:13
archives users network share files, disables user, removes groups, dates with disable date
function Archive_User {
<#
.Synopsis
Clean up user from Active directory and Exchange
.DESCRIPTION
Script to copy and save the users network storage documents and .pst file to \\Server\Share\.
Deletes exchange mailbox
Disables and moves the users network account to specified OU.
Removes all titles and department information.
Removes from all groups except domain users
@k12sysadmin
k12sysadmin / New_student.ps1
Last active March 14, 2018 22:13
Create student users as they enroll
#New Student User Script
#Created May 2017
#Function to automate creation of Student AD and email accounts
#Prompted for new user information: first name, last name, location, and Grade
#Based on School user will be place in proper OU and groups (high school and middle school only)
Function New_Student {
@k12sysadmin
k12sysadmin / New_Staff.ps1
Created March 14, 2018 21:45
Create new staff user AD account and email. Assign to groups.
#New Staff User Script
#Created May 2017
#Function to automate creation of Staff AD and email accounts
#Prompted for new user information: first name, last name, location, and job title
#Based on Building and job title user will be place in proper OU and groups
Function New_Staff {