0
0
PowerShellscripting~5 mins

PowerShell on macOS - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is PowerShell on macOS?
PowerShell on macOS is a cross-platform command-line shell and scripting language that runs on macOS, allowing users to automate tasks and manage systems using PowerShell commands.
Click to reveal answer
beginner
How do you install PowerShell on macOS?
You can install PowerShell on macOS using Homebrew with the command: brew install --cask powershell. After installation, start it by typing pwsh in the Terminal.
Click to reveal answer
beginner
How do you start PowerShell on macOS after installation?
Open the Terminal app and type pwsh, then press Enter. This launches the PowerShell environment on macOS.
Click to reveal answer
intermediate
Can PowerShell scripts written on Windows run on macOS without changes?
Many PowerShell scripts can run on macOS without changes, but scripts that use Windows-specific features or paths may need adjustments to work on macOS.
Click to reveal answer
beginner
What is a simple PowerShell command to list files in the current directory on macOS?
Use Get-ChildItem or its alias ls to list files and folders in the current directory.
Click to reveal answer
Which command installs PowerShell on macOS using Homebrew?
Abrew install --cask powershell
Bapt-get install powershell
Cyum install powershell
Dchoco install powershell
How do you start PowerShell in macOS Terminal after installation?
Apowershell
Bpwsh
Cps
Dshell
Which command lists files in the current directory in PowerShell on macOS?
Adir
Bls
CGet-ChildItem
DBoth B and D
What might cause a PowerShell script to fail when moved from Windows to macOS?
AUsing variables
BUsing PowerShell cmdlets
CUsing Windows-specific paths or commands
DUsing comments
Is PowerShell on macOS open source and cross-platform?
AYes, it is open source and runs on multiple platforms
BNo, it only runs on Windows
CIt is open source but only runs on Windows
DIt is proprietary and macOS only
Explain how to install and start PowerShell on macOS.
Think about the package manager on macOS and the command to launch PowerShell.
You got /3 concepts.
    Describe one challenge when running PowerShell scripts from Windows on macOS and how to address it.
    Consider differences in file paths and system commands.
    You got /3 concepts.