command syntax

#1. Write the Write the command syntax to complete the following filesystem tasks
#a. Write the command syntax to create a new Directory named “FinalExam” on the root of drive C:
#b. Write the command syntax to create a new Directory named “yourname” (use your actual first and last name: for example JimNichols) within the C:FinalExam directory
#c. Write the command syntax to create a .txt file named yourname.txt (use your actual first and last name: for example JimNichols.txt) within the C:FinalExam directory
#d. Write the command syntax to remove the C:FinalExam directory (including all it’s contents)
#2. Write the PowerShell syntax to get the 15 most recent error eventlog entries from the system log# and save the output in a .txt file named errorlog.txt on the root of drive C:
#3. Write the PowerShell syntax to obtain all Processes that begin with the letter “S”, export the output in CSV format in a file# named “Processes.CSV” on the root of drive C:
#4. Write the PowerShell syntax to show Processes ordered by CPU usage (with the highest CPU usage at the top),# only display three properties in the output (In this order: ID, ProcessName, CPU), Only show the processes with the top# 15 CPU usage, and save the output to a file named “ProcessCPU.txt” on the root of drive C:
#5. Write the PowerShell syntax to extract the computer name strings from the Computers.csv file (located within the FinalExamFiles folder) and feed the strings# to the -ComputerName parameter of the get-service cmdlet.
#6. Write the PowerShell syntax to:# Obtain Volume Information about Volume “C”# Display only three properties: DriveLetter, Capacity, and FreeSpace in List Format (Note: The properties Capacity and FreeSpace do not exist: You need to create custom properties)# To create these custom properties, convert Size into ‘Capacity’and convert SizeRemaining into ‘FreeSpace’# Alter the display of both Capacity and FreeSpace so that the results are in GB and as an Integer# Lastly, save the results to a txt file named “VolumeInfo.txt” on the root of drive C:
# NOTE: Write the syntax so filtering is performed per best practice
#7. Write the PowerShell syntax to display four custom properties of the Get-ComputerInfo cmdlet in List format.# The custom List properties should be labed ComputerName, RAM(MB), WindowsEdition, and WindowsBuildNumber# To create these custom properties, convert CsDNSHostName into ComputerName, CsPhyicallyInstalledMemory into RAM(MB), WindowsProductName into WindowsEdition, and OsBuildNumber into WindowsBuildNumber# The RAM(MB) should be displayed in MegaBytes and as an Integer. (Hint: To get the RAM in MegaBytes, devide by 1KB)
#8. Write the PowerShell syntax to complete the following two tasks.
#a. Import the “NewHire.csv” file, create three custom properties; Name, Fullname, and Description # (convert AccountName into Name, CompleteName into FullName, JobRole into Description), then pipe into the New-LocalUser cmdlet with the -NoPassword parameter
#b. #In part “a” you created four new Windows User accounts. Write the PowerShell syntax to import the “NewHire.csv” file, and use the names within the file to remove the user accounts from Windows.
#9. Write the PowerShell syntax to:# Obtain a list of Processes# Sort by Process ID (Highest IDs at the top)# Display only three properties: ProcessName, ID, and Handles in table format# Filter the list of processes so that only Handles larger than 1000 are displayed. Also filter out any Process Names that start with the letter “S”.# Lastly, save the results to a txt file named “ProcessHighHandles.txt” on the root of drive C:
# NOTE: Write the syntax so filtering is performed per best practice
Computer.csv

hostname OperatingSystem
localhost Windows10
localhost Windows8
localhost Windows7


newhire.csv

AccountName CompleteName JobRole
bsmith Brian Smith CEO
kjones Kathy Jones CFO
wbarden Wade Barden WorkerLev3
kgenrich Kristen Genrich WorkerLev2

Attached File: 

f