top of page

The Full Story

PowerShell

This is your About Page. It's a great opportunity to give a full background on who you are, what you do and what your website has to offer. Double click on the text box to start editing your content and make sure to add all the relevant details you want to share with site visitors.

Main Commands

Get-ChildItem env:

$env:windir

App To Download: Cmder

$env: user_trainaweb

systeminfo.exe

wsl --install 

wsl

App to Download in Microsoft Store: Ubuntu/Debian

IN LINUX

busybox httpd -f -vv -p 8080

IN A NEW PAGE

pwd

touch index.html

nano index.html

SAVE - Control O CLOSE - Control S

P\PowerShell

CLS clears the terminal

CMDLETS

Get-Command 

Get-Command -CommandType CmdLet

Get-ChildItem

dor

dir

FUNCTIONS

Get-Command -CommandType Functions

Get-Command -CommandType Alias

Set-Alias limpar Clear-Host​

Get-Help Write-host

Update-Help

Get-Help Write-Host -example

The code: ​https://github.com/treinaweb/treinaweb-powershell-fundamentos

Powershell is based on .NET

More commands

Get- Process

Get-Process |  more 

Get-Help convertTo-Html

Get-Process | ConvertTo-Html

Get-Process | ConvertTo-Html | Out-File "processos.html"

Ls

Start

Get-Help Start-Process

Start-Process .\processos.html

Get-Content .\processos.text

Cmdlets Out

Where-Object



Network Commands

Get-Process | Out-default

Get-Process | Out-Host

Get-Process | Out-Null

Get-Process | Out-Printer

Get-Process | Out-String

Get-Process | Out-GridView

Get-help Where-Object -examples

Get-Service | more 

Get-Service | Where-Object { $_.Status -eq "Running"}

Get-Service | Where-Object { $_.Status -ne "Running"}

Get-Service | Where-Object { $_.Name -like "*Security*"}

Get-NetIPaddress

Get-NetIPAddress -AddressFamily IPv4

Get-NetAdapter​

Test-Conncection

Test-Connection -ComputerName www.google.com

Get-Help Get-NetIPConfiguration

Get-Help Get-NetIpConfiguration -online​

​Get-Help Get-NetRoute

Get-NetRoute

Get-Help Get-NetNeighbor

Get-NetNeighbor

Disk and Volumes

Get-help New Partition
DO NOT USE: New-Partition -DiskNumber 0 -UseMaxiumSize -AssignDriveLetter
Get-Help Format-Volume
Format-Volume-DriveLetter C -FyleSystem  NTFS -NewFileSystemLabel "NovoVolume"?^C
Get-Help Resize-Partition 
Resize-Partition -DriveLetterC -Size 50GB
Mount-DiskImage -imagePath "C:\Users\sousa\Downloads\linux.iso"^C
Get-Volume | Select-Object DriveLetter. SizeRemaining, Size 

Services And Processes

Get-Service -Name "Spooler"
Start-Service -Name "Spooler"
Stop-Service -Name "Spooler"
Restart-Service -Name "Spooler"
Get-Service | Select-Object ^C
Get-Service | Select-Object Status, Name, DisplayName, StartType
Set-Service -Name "wuauserv" -StartupType Automatic
Get-Process
Get-Help Start-process
Start-Process notepad
Stop-Process -Name notepad

Lisa Driver, MI

“Have customers review you and share what they had to say. Click to edit and add their testimonial.”

STEM Camp

500 Terry Francine Street

San Francisco, CA 94158

info@mysite.com

Tel: 123-456-7890

  • Instagram
  • Facebook
  • YouTube

What can we help you with?

© 2035 by STEM Camp. Powered and secured by Wix

bottom of page