Windows 10 PowerShell Tips

Reset Network

netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns

Get Mac Address

getmac
ipconfig /all

Set DNS Server

Set-DNSClientServerAddress -interfaceIndex 19 -ServerAddresses (“1.1.1.1“, “8.8.8.8“)
netsh interface ipv4 set dns name=”Local Area Connection* 2” static 1.1.1.1

Set IP Address

netsh interface ipv4 set address name=”Local Area Connection* 2” static 192.168.20.10 255.255.255.0 192.168.20.1

Get Windows Serial Number

$(Get-WmiObject -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey

Show Hidden Files & Folders

attrib -r -h -a -s E:\*.* /s /d

Get All Process

tasklist

Kill Process

taskill /f /im firefox.exe
stop-process -name notepad
stop-process -ID 2197

Copy Large Files / Folders

XCOPY Folder01 E:\ /J /E
Copy-Item database.sql -Destination E:\

Scan File System

SFC /scannow

Get Battery Health Status

powercfg /batteryreport /output “E:\battery-report.html”

Get System Info

get-computerinfo
get-computerinfo -property “os*”

Tags:

Leave a Reply

All fields marked with an asterisk (*) are required