C916
powershell_labs
Project 1
File:Requirements1.zip
File:Prompts.ps1.txt
Project 2
A) create file "restore.ps1" including first,last, student B) Create Powershell script
1) Create AD OU = "finance" 2) Import from "financePersonnel.csv" into OU=finance (First Name, Last Name, Display Name=[First"+" "+Last], Postal Code, Office Phone, Mobile Phone) 3) Create DB = "ClientDB" on "UCERTIFY3" SQL server 4) Create Table = "Client_A_Contacts" (add to DB step 3) 5) Insert Data from file = "NewClientData.csv" (into Table create from step 4)
C) Use try-catch System.OutOfMemoryException D) Reports:
1) Get-ADUser -Filter * -SearchBase “ou=finance,dc=ucertify,dc=com” -Properties DisplayName,PostalCode,OfficePhone,MobilePhone > .\AdResults.txt 2) Invoke-Sqlcmd -Database ClientDB –ServerInstance .\UCERTIFY3 -Query ‘SELECT * FROM dbo.Client_A_Contacts’ > .\SqlResults.txt
E) SUBMIT Directions:
1) Compress folder and create "Requirements2.zip" file 2) Run the "Get-FileHash" cmdlet against the “Requirements2.zip” file 3) PASTE hash value into comment section when submitting.
NOTES & files needed: restore.ps1 AdResults.txt SqlResults.txt financePersonnel.csv NewClientData.csv
File:Supporting docs Requirements2.zip
File:Requirements2.zip
File:Report1.ps1.txt
File:Report2.ps1.txt
File:Restore.ps1.txt
File:2ndpart.ps1.txt