Open three websites(tabs) on Google Chrome at the same time
(Time-Limit:1:00)
Start-PRocess chrome "amazon.com","wish.com", "YouTube.com"
How to get the number of counts of Commands stored on your Powershell version?
(Time-Limit: 1:00)
(Get-Command).count
Script to open up a blank "NotePad" file
(Time-Limit: 1:00)
Notepad
OR
Start-Process -FilePath "NotePad" -WindowStyle Maximized
OR
Start-Process -FilePath "NotePad" -WindowStyle Max
What script you use to save, all the work you have done, something you are supposed to do Before you start writing scripts?
(Time-Limit: 1:00)
Start-Transcript
Change today's date 3Days ahead
(TimeLimit:1:00)
(Get-Date).AddDays(3)
Change your PS: C\ Location
(Time-Limit: 1:00)
PS C:\WINDOWS\system32> Set-Location -Path C:\scripts
PS C:\scripts>
Open up a .txt file
(Time-Limit: 2:00)
Start-Process -FilePath "FileName.txt" -WorkingDirectory "C:\Location" -verb open
OR
Start-Process C:\Location\FileName.txt
OR
notepad C:\Location\FileName.txt
OR
C:\Location\FileName.txt
What command do you use to get the trail of commands you did so far?
(Time-Limit: 1:00)
Get-History
Change the clock hours five ahead
(TimeLimit:1:00)
(Get-Date).AddHours(5)
In PowerShell, placing a $ dollar sign in front of a word (or a series of characters) does what?
(Time-Limit: 1:00)
Denotes that the word is a variable.
For example, I wanted to assign a name to a variable, I might use a command like this: $Name = 'Sam' Similarly, PowerShell allows you to map an entire command string to a variable.
How do you view PS Version, PS Edition, PS Compatible Versions, Build Version, CLR Version, WS Man Stack Version, PS Remoting Protocol Version, Serialization Version? All at once
(Time-Limit: 1:00)
$PSVERSIONTABLE
Get today's date
(Time-Limit: 1:00)
Date
OR
Get-Date
OR
Get-Content -Path .\DateTime.txt
Change the clock hours 2 behind
(TimeLimit:1:00)
(Get-Date).AddHours(-2)
How to get just the running service status for
'Get-Service'
& Open on the notepad file
(Time-Limit: 4:00)
Get-Service| Where-Object status -eq 'running'|Select-Object name,status
$data = Get-Service| Where-Object status -eq 'running'|Select-Object name,status
$data |out-file .\runningService.csv
notepad .\runningService.csv
Script: To run Powershell as an Admin within Powershell
(Time-Limit: 1:00)
Start-Process -FilePath "PowerShell" -verb RunAs"
OR
Start "PowerShell" -verb Runas
A command that shows you all the Commands names that start with the letter 'p'
(Time-Limit: 1:00)
Get-Command p*
Change the Date two months behind
(TimeLimit:1:00)
(Get-Date).AddMonth(-2)
Make a text display from a file onto your Admin Window PowerShell
(Time-Limit: 2:00)
Get-Content C:\FileLocation\FileName.txt
Example:
Get-Content C:\Users\Owner\Documents\Fruit\Favorite.txt
Out-put:
"Kiwi"
Copying a file to Desktop?
(Time-Limit: 3:00)
Copy-item -Path C:\Location\FileName.txt -Destination C:\Users\Desktop
Example:
Copy-Item -Path C:\scripts\transcripts\history.txt -Destination C:\Users\Sam\Desktop
List all command that begins the letter 'M' on to notepad file
(Time-Limit: 2:00)
$M = Get-Command m*
$M|out-file .\letterM.csv
notepad .\letterM.csv