More Power shell One Liners
PowerShell One-Liners Permalink Time of the Last Reboot Permalink (Get-CimInstance Win32_OperatingSystem).LastBootUpTime Find Your Public IP Address Permalink (Invoke-RestMethod ipinfo.io/json).ip Find Domain Controllers on Your Domain Permalink Resolve-DnsName -Type ALL -Name _ldap._tcp.dc._msdcs.$env:userdnsdomain List Software Available for Uninstall Permalink Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table Install PowerShell Core (6 and 7) Permalink Invoke-Expression "& { $(Invoke-RestMethod -Uri aka.ms/install-powers…) }" -UseMSI -Preview Get Free Space for System Drive Permalink (Get-PSDrive $Env:SystemDrive.Trim(':')).Free/1GB Get Parent Process(es) Permalink foreach ($prid in ($ppid = foreach ($process in (Get-Process -Name "powershell")) { (Get-CimInstance Win32_Process | Where-Object processid -EQ $process.Id).parentprocessid })) { Ge...