Powershell |
DOS |
Example |
Clear-Host |
cls |
clear |
|
Remove-Item |
del |
Remove-item file.txt |
|
Get-Help |
help |
Get-help test* |
|
update-help |
n/a |
update offline help. (administrator)get |
|
Set-location |
cd |
set-location c:\ |
|
Get-Childitem |
dir |
add -recursive for dir /s |
|
Write-Output |
echo |
|
|
Move-item |
move |
|
|
Copy-Item |
copy |
|
|
rename-item |
rename |
|
|
md |
mkdir |
|
|
Start-Sleep |
sleep |
|
|
Test-Connection |
ping |
Test-Connection www.google.ie |
|
Test-NetConnection |
ping |
Test-NetConnection
-ComputerName www.microsoft.com -InformationLevel
Detailed
|
|
Test-NetConnection |
tracert |
Test-NetConnection
www.microsoft.com –TraceRoute
|
|
Test-NetTCPConnection |
netstat |
Get-NetTCPConnection | Group
State, RemotePort | Sort Count | FT Count, Name
-Autosize
|
|
Get-NetIPConfiguration |
ipconfig |
Get the IP network
configuration
|
|
Get-NetIPAddress |
ipconfig
|
|
|
Get-DNSClientCache
|
ipconfig /displaydns
|
|
|
Clear-DNSClientCache
|
ipconfig /flushdns
|
|
|
Test-computersecurechannel |
n/a |
|
|
Resolve-DnsName |
nslookup
|
Resolve-DnsName
microsoft.com -Server 8.8.8.8 –Type A
|
|
Get-NetRoute |
route print |
Get-Netroute -Protocol local |
|
Set-ExecutionPolicy |
n/a |
Set-ExecutionPolicy
-ExecutionPolicy RemoteSigned
|
|
Set-ExecutionPolicy |
|
Set-ExecutionPolicy
-ExecutionPolicy unrestricted
|
|
Get-Executionpolicy
|
n/a
|
Find Execution policy
|
|
Get-Service |
n/a
|
running services |
|
Get-Process |
n/a |
running processes |
|
Get-Hotfix |
n/a |
Get-Hotfix | format-table |
|
Get-Alias |
n/a |
List all alias |
|
Get-Alias |
|
create new alias; new-item
alias:np -value C:\windows\system32\notepad.exe
|
|
Get-Printer |
n/a |
display connected printers |
|
|
|
|
|