Practical Instructions.
You should complete this Project using your ACE Servers (Server1). The server to use will be indicated in the question.
In this Project you will complete Three objectives using only Powershell.
- Do not use the GUI for anything in your answer (you can use the GUI to check your work, but 100% of the work must be accomplished VIA Powershell commands).
- Do not use CMD commands. ONLY Powershell commands and modules (e.g, no DISKPART).
Do not use Powershell 5.1. I want you to make these commands work in the most current version of Powershell (which is 7.4.X).
I will verify if the answer is correct. I will do this by replacing any environment-specific values (hostnames, domain names, etc) and will copy/paste the command into my environment. If the command does not work, I will attempt to correct the broken command and grade you on what works.
Important: if you use novel code, I will NOT fix your command. I will simply grade the functionality of the command at zero (you can still obtain partial points in other ways; see the rubric). “Novel Code” is any programmatical syntax that we have not learned in class (using WMI, C#, etc.). If you want the points, you must explain to me why it is broken and supply me with the corrections. This is being done to prevent students from copying/pasting code from the internet or using generative AI to form functional commands.
Once you have found the correct answer, you must indicate the commands you used. For each command you use you must do the following:
- Explain the purpose/function of the command (as a whole).
- Explain how each parameter in the command is used and why it was used.
- The usage of each value should also be explained (i.e., why did you use that value, specifically, as opposed to something different).
- (If pipes are used) explain what object is being passed in the pipe and how the next command uses that object.
- Each question will have specific instructions on what is to be delivered.
Documentation Instructions (deliverables to submit)
In your answer explanations I will be looking for the following criteria:
- Is there a screenshot showing the command working? This is required to receive points.
- Was the command fully explained (including all parameters and values)?
- Did you use the appropriate terminology? I’m looking to see if you can refer to the constituent components of the Powershell environment using the correct terminology (i.e., you did not use generic, vague, or incorrect terms).
The document you submit, and its format, will also be graded. Your submission must meet the following criteria:
- Must be a word (.docx) document.
- The formatting of the document should meet the following criteria:
- The word document should be easy to follow.
- The word document should be labeled correctly.
- Title the Document: “CLI II: Project 2”.
- Indicate your Name, Class, the Date, and Course number.
- Each question should be clearly indicated as well.
- The word document should indicate or highlight the objects of interest in simple and clear way (i.e., ordered or unorder lists, bold, italics, etc.).
- Any “Code” in the document should be formatted in the Lucida Console font. All other text should use the Calibri font.
- Do not use word art.
- Do not overuse colours or highlighting.
Should the document be incorrectly formatted, you may lose points.
Tips/Advice
- Keep it simple. You may want to try to impress me by making something more complicated than is required. Don’t do this. It will waste your time, and my time. I’m expecting very specific answers, and those answers will be uncomplicated (for the most part) and straight forward. If you submit a script, or something outside of the course scope, it will simply take me longer to mark it. Remember, we are learning fundamentals. Let’s stick with that principle.
- You don’t have to write ‘one-liners’. You don’t have to use pipes. You aren’t required to do anything other than make it work. Again: don’t overcomplicate the answer. Some of these questions may require 3 or 4 separate statements to work correctly. This is fine. Use as many statements or commands as required to get the job done.
- User every resource available to help:
- The help files (online and offline)
- The book
- The lectures
- Your notes
- The internet
But do it yourself. The one resource you shouldn’t use is each other, because that is cheating.
Also, the use of generative AI (ChatGPT, Copilot, etc.) is prohibited. I fully recognize that generative AI is a tool used by developers in the real world, and that there is a place for it; this project is not that place.
- Look at the Rubric (it is attached to the drop box for Project 2) for the criteria I am going to use to mark you. Use the Rubric to as a checklist of items that must be completed.
- Get the commands to work first. Then work on writing the document and formatting it.
- Step-by-step.
Activity |
Question 1
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- Using only Powershell commands or modules, add a computer object to active directory (just the object, we’re not joining a computer to the domain).
- The command must configure the following properties of the computer:
- Computer object name: Test1-XXX
- Computer objects samAccountName: Test1-XXX$
(the $ is part of the samAccountName)
- Computer must be created inside the “Computers” container.
- Should be Managed by Leonard Wright
- Should have a description of “This computer is for Project 2 and should be deleted following the completion of the Project”.
- Should have a location of “NBCC Academic Compute Center.”
- All the above parameter values must be referenced as variables. You may not have in-line values in your command; every value is to be referenced as a variable.
- All variable types must be declared at the time each variable is created/initialized.
Question 2
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- (This step can be done using the GUI)
Create a folder on Server1-XXX called C:\Project2\. - (This step can be done using the GUI)
Download the domainComp.csv file from BrightSpace and copy to Server1-XXX in the C:\Project2\ folder. - (This step can be done using the GUI)
Open the CSV file.- Replace XXX with the 3-letter initials you use for computers in your domain.
- Replace YYYY with the 4-letter name of your domain.
- Save the CSV file.
- Using the domainComp.csv as input, the New-ADComputer command, and a ForEach-Object command, create computer account objects for Test2-XXX, Test3-XXX, and Test4-XXX. The created computers must have the -name, -samAccountName, and -managedBy (managed by Leonard Wright) parameters set during creation.
- You must use the .csv as input and you may not manually enter the values for any of the parameters.
- Upon the completion of this question, you should have four computer objects in the “Computers” container of your active directory DC (Test1-XXX, Test2-XXX Test3-XXX, and Test4-XXX).
Question 3
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- Run the following command:
New-ADComputer -name Test5-XXX (where XXX is your 3-letter initials).
(Note: if you did not complete question 2 successfully, you may create Test2-4 manually to facilitate question 3).
- Declare a variable $proj2Comp explicitly as an array data type.
- Using the output of a Get-ADComputer command, initialize $proj2Comp with an array that contains only the distinguished names of each Test-XXX computer (all five). The $proj2Comp variable should now contain an array of DNs.
- Create a new variable called $testCompDN. Using the split method (.split()) against the $proj2Comp variable, split each component of the array entry for only Test2-XXX’s DN, into a sperate line in a new array and write that new array back to a the $testCompDN variable .
- Display the $testCompDN variable to the screen. $testCompDN should now contain an array with the four DN component for Test2-XXX, each on a separate line.
- Now the fun Part:
- Using the line-by-line values of the array in $testCompDN remove the Test2-XXX computer account from active directory.
- You must use the DN to identify the object to delete (you can’t use name, GUID, SID, etc).
- You will create the DN value by using each DN component stored in the $testCompDN array.
(you may not write the DN as a literal string, it should be broken up into variables separated by commas).
Practical Instructions.
You should complete this Project using your ACE Servers (Server1). The server to use will be indicated in the question.
In this Project you will complete Three objectives using only Powershell.
- Do not use the GUI for anything in your answer (you can use the GUI to check your work, but 100% of the work must be accomplished VIA Powershell commands).
- Do not use CMD commands. ONLY Powershell commands and modules (e.g, no DISKPART).
Do not use Powershell 5.1. I want you to make these commands work in the most current version of Powershell (which is 7.4.X).
I will verify if the answer is correct. I will do this by replacing any environment-specific values (hostnames, domain names, etc) and will copy/paste the command into my environment. If the command does not work, I will attempt to correct the broken command and grade you on what works.
Important: if you use novel code, I will NOT fix your command. I will simply grade the functionality of the command at zero (you can still obtain partial points in other ways; see the rubric). “Novel Code” is any programmatical syntax that we have not learned in class (using WMI, C#, etc.). If you want the points, you must explain to me why it is broken and supply me with the corrections. This is being done to prevent students from copying/pasting code from the internet or using generative AI to form functional commands.
Once you have found the correct answer, you must indicate the commands you used. For each command you use you must do the following:
- Explain the purpose/function of the command (as a whole).
- Explain how each parameter in the command is used and why it was used.
- The usage of each value should also be explained (i.e., why did you use that value, specifically, as opposed to something different).
- (If pipes are used) explain what object is being passed in the pipe and how the next command uses that object.
- Each question will have specific instructions on what is to be delivered.
Documentation Instructions (deliverables to submit)
In your answer explanations I will be looking for the following criteria:
- Is there a screenshot showing the command working? This is required to receive points.
- Was the command fully explained (including all parameters and values)?
- Did you use the appropriate terminology? I’m looking to see if you can refer to the constituent components of the Powershell environment using the correct terminology (i.e., you did not use generic, vague, or incorrect terms).
The document you submit, and its format, will also be graded. Your submission must meet the following criteria:
- Must be a word (.docx) document.
- The formatting of the document should meet the following criteria:
- The word document should be easy to follow.
- The word document should be labeled correctly.
- Title the Document: “CLI II: Project 2”.
- Indicate your Name, Class, the Date, and Course number.
- Each question should be clearly indicated as well.
- The word document should indicate or highlight the objects of interest in simple and clear way (i.e., ordered or unorder lists, bold, italics, etc.).
- Any “Code” in the document should be formatted in the Lucida Console font. All other text should use the Calibri font.
- Do not use word art.
- Do not overuse colours or highlighting.
Should the document be incorrectly formatted, you may lose points.
Tips/Advice
- Keep it simple. You may want to try to impress me by making something more complicated than is required. Don’t do this. It will waste your time, and my time. I’m expecting very specific answers, and those answers will be uncomplicated (for the most part) and straight forward. If you submit a script, or something outside of the course scope, it will simply take me longer to mark it. Remember, we are learning fundamentals. Let’s stick with that principle.
- You don’t have to write ‘one-liners’. You don’t have to use pipes. You aren’t required to do anything other than make it work. Again: don’t overcomplicate the answer. Some of these questions may require 3 or 4 separate statements to work correctly. This is fine. Use as many statements or commands as required to get the job done.
- User every resource available to help:
- The help files (online and offline)
- The book
- The lectures
- Your notes
- The internet
But do it yourself. The one resource you shouldn’t use is each other, because that is cheating.
Also, the use of generative AI (ChatGPT, Copilot, etc.) is prohibited. I fully recognize that generative AI is a tool used by developers in the real world, and that there is a place for it; this project is not that place.
- Look at the Rubric (it is attached to the drop box for Project 2) for the criteria I am going to use to mark you. Use the Rubric to as a checklist of items that must be completed.
- Get the commands to work first. Then work on writing the document and formatting it.
- Step-by-step.
Activity |
Question 1
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- Using only Powershell commands or modules, add a computer object to active directory (just the object, we’re not joining a computer to the domain).
- The command must configure the following properties of the computer:
- Computer object name: Test1-XXX
- Computer objects samAccountName: Test1-XXX$
(the $ is part of the samAccountName)
- Computer must be created inside the “Computers” container.
- Should be Managed by Leonard Wright
- Should have a description of “This computer is for Project 2 and should be deleted following the completion of the Project”.
- Should have a location of “NBCC Academic Compute Center.”
- All the above parameter values must be referenced as variables. You may not have in-line values in your command; every value is to be referenced as a variable.
- All variable types must be declared at the time each variable is created/initialized.
Question 2
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- (This step can be done using the GUI)
Create a folder on Server1-XXX called C:\Project2\. - (This step can be done using the GUI)
Download the domainComp.csv file from BrightSpace and copy to Server1-XXX in the C:\Project2\ folder. - (This step can be done using the GUI)
Open the CSV file.- Replace XXX with the 3-letter initials you use for computers in your domain.
- Replace YYYY with the 4-letter name of your domain.
- Save the CSV file.
- Using the domainComp.csv as input, the New-ADComputer command, and a ForEach-Object command, create computer account objects for Test2-XXX, Test3-XXX, and Test4-XXX. The created computers must have the -name, -samAccountName, and -managedBy (managed by Leonard Wright) parameters set during creation.
- You must use the .csv as input and you may not manually enter the values for any of the parameters.
- Upon the completion of this question, you should have four computer objects in the “Computers” container of your active directory DC (Test1-XXX, Test2-XXX Test3-XXX, and Test4-XXX).
Question 3
- This question is done on Server1-XXX.
- Use only Powershell commands.
- Do not download any additional modules from the internet.
- Show all commands used, executing successfully, in a Screenshot. You may use more than one screenshot but ensure that you label the screenshots properly.
- Below the screenshot, explain every command used:
- the command’s purpose (generally).
- what each component of the command does (cmdlet, parameter, value, etc.).
- Run the following command:
New-ADComputer -name Test5-XXX (where XXX is your 3-letter initials).
(Note: if you did not complete question 2 successfully, you may create Test2-4 manually to facilitate question 3).
- Declare a variable $proj2Comp explicitly as an array data type.
- Using the output of a Get-ADComputer command, initialize $proj2Comp with an array that contains only the distinguished names of each Test-XXX computer (all five). The $proj2Comp variable should now contain an array of DNs.
- Create a new variable called $testCompDN. Using the split method (.split()) against the $proj2Comp variable, split each component of the array entry for only Test2-XXX’s DN, into a sperate line in a new array and write that new array back to a the $testCompDN variable .
- Display the $testCompDN variable to the screen. $testCompDN should now contain an array with the four DN component for Test2-XXX, each on a separate line.
- Now the fun Part:
- Using the line-by-line values of the array in $testCompDN remove the Test2-XXX computer account from active directory.
- You must use the DN to identify the object to delete (you can’t use name, GUID, SID, etc).
- You will create the DN value by using each DN component stored in the $testCompDN array.
(you may not write the DN as a literal string, it should be broken up into variables separated by commas).