Create a script that allows user to perform the following tasks:
a.
Create multiple users on the local machine
(hint use New-LocalUser cmdlet)
b.
Create a folder named
UsernameConfidentialFolder (example,
TamiratConfidentialFolder)
c.
Create a file in the above folder named
Secretfile.txt. Pipe the Get-Service output
into the file just so that it’s not empty
Create multiple users on the local machine
.\New-LocalObject.ps1 -ObjectType User -ObjectName FirstUser
.\New-LocalObject.ps1 -ObjectType User -ObjectName SecondUser
Create a folder named
UsernameConfidentialFolder
New-Item -Path "c:\" -Name "TamiratConfidentialFolder" -ItemType "directory"
Create a file in the above folder named
$text = 'Hello World!' | Out-File $text -FilePath TamiratConfidentialFolder\.SecretFile.txt
Get-Service -Displayname "*Hello World!*"
Get Answers For Free
Most questions answered within 1 hours.