Win201A-En-I-02.1/2.2: CMD - Exe Vs Powershell - Exe/Command Discovery Using Windows Powershell 4.0
Win201A-En-I-02.1/2.2: CMD - Exe Vs Powershell - Exe/Command Discovery Using Windows Powershell 4.0
exe/Command Discovery
using Windows PowerShell 4.0
Objective
Scenario
NOTE: These exercises use many Windows PowerShell commands. You can type these commands into the
Windows PowerShell Integrated Scripting Environment (ISE) or the Windows PowerShell console. For some
exercises, you can load pre-typed lab files into the Windows PowerShell ISE, allowing you to select and execute
individual commands. Each lab has its own folder under C:\PShell\Labs\ on WIN8-WS.
Some exercises in this workshop may require running the Windows PowerShell console or ISE as an elevated user
(Run as Administrator).
We recommend that you connect to the virtual machines (VMs) for these labs through Remote Desktop rather than
connecting through the Hyper-V console. This allows you to use copy and paste between VMs and the host
machine. If you are using the online hosted labs, then you are already using Remote Desktop.
Virtual Machines
1. 2012R2-DC
2. 2012R2-MS
3. WIN8-WS
Exercise 1 : Videos
Scenario:
Traditionally Microsoft Windows has included the command prompt (cmd.exe) to execute commands. Windows
PowerShell provides backward compatibility to continue to use these legacy commands, or to use Windows
PowerShell’s native commands (Cmdlets).
2. Sign In to WIN8-WS
Sign in to WIN8-WS as Contoso\Administrator with the following password: PowerShell4 and press
Enter.
Note: You may also use the Commands menu to automatically paste the virtual machine default
Password (PowerShell4).
This is something that you you should know.. But may not
4. Use Cmdlets
Type the commands listed in the Knowledge [Head icon] box.
cd c:\windows
dir
cls
ipconfig
ping 2012R2-MS
net share
cd c:\windows
dir
cls
ipconfig
ping 2012R2-MS
net share
Set-Location C:\Windows
Get-ChildItem
Clear-Host
Get-NetIPConfiguration
Get-NetIPConfiguration -Detailed
Test-Connection 2012R2-MS
Get-SMBShare
NOTE: The Windows PowerShell Integrated Scripting Environment (ISE) is a host application for
Windows PowerShell.
In Windows PowerShell ISE, you can run commands and write, test, and debug scripts in a single
Windows-based graphic user interface with multiline editing, tab completion, syntax coloring,
selective execution, context-sensitive help, and support for right-to-left languages.
You can use menu items and keyboard shortcuts to perform many of the same tasks that you
would perform in the Windows PowerShell console.
Congratulations!
Get-SMServerService
Get-Service
New-Service
Restart-Service
Resume-Service
Set-Service
Start-Service
Stop-Service
Suspend-Service
5. Type Cmdlets
Type the commands listed in the Knowledge box.
Get-Help Get-Service
To play the full course, click the following link: PowerShell 4 for the IT Pro, Part 1