Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 732 Bytes

OneLiners.md

File metadata and controls

16 lines (11 loc) · 732 Bytes

PowerShell One Liners

Sectional stuff here

# Get Start up Application info, User context and Location info via CIM
Get-CimInstance Win32_StartupCommand | Select-Object Name,User,Description,Location,Command
[Version]$OSVer = ((cmd /c ver).split()[4]).trim("]")

# Get Network Adapter 'Ethernet' Link speed
( Get-NetAdapterAdvancedProperty -Name Ethernet -DisplayName "Speed & Duplex" ).DisplayValue

# Get Valid link speeds for Adatper 'Ethernet'
( Get-NetAdapterAdvancedProperty -Name Ethernet -DisplayName "Speed & Duplex" ).ValidDisplayValues

# Change link speed for Adapter 'Ethernet'
( Set-NetAdatperAdvancedProperty -Name Ethernet -DisplayName "Speed & Duplex" -DisplayValue "Auto Negotiation"