Skip to content

Windows Tips and Tricks

Windows Administration Tools

Windows System Administration

Power • Configure • Secure • Automate


Update Help

Update-Help

Delete Xbox Game Bar

Get-AppxPackage Microsoft.XboxGamingOverlay | Remove-AppxPackage

Check if screensaver is enable or disable

reg query "HKCU\Control Panel\Desktop" /v ScreenSaveActive

Disable monitor timeout and sleep AC/DC

powercfg /change monitor-timeout-ac 0
powercfg /change monitor-timeout-dc 0
powercfg /change standby-timeout-ac 0
powercfg /change standby-timeout-dc 0

Uininstall Tips and Get Help applications

"Microsoft.GetHelp","Microsoft.Getstarted" |
ForEach-Object {
  Get-AppxPackage $_ | Remove-AppxPackage
  Get-AppxProvisionedPackage -Online | Where DisplayName -eq $_ |
    Remove-AppxProvisionedPackage -Online
}

Launch an application (example: Microsoft Windows Store)

  • Few examples
start ms-windows-store:
Start-Process ms-windows-store:
explorer.exe ms-windows-store:

Disable UAC via Registry (PowerShell)

Set-ItemProperty `
  -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" `
  -Name ConsentPromptBehaviorAdmin `
  -Type DWord `
  -Value 0

Get-Tpm status

TpmPresent                : False
TpmReady                  : False
TpmEnabled                : False
TpmActivated              : False
TpmOwned                  : False
RestartPending            : False
ManufacturerId            : 0
ManufacturerIdTxt         : 
ManufacturerVersion       : 
ManufacturerVersionFull20 :
ManagedAuthLevel          : Full
OwnerAuth                 :
OwnerClearDisabled        : True
AutoProvisioning          : NotDefined
LockedOut                 : False
LockoutHealTime           :
LockoutCount              :
LockoutMax                :
SelfTest                  :

Search for vim and gvim

Get-Command gvim -ErrorAction SilentlyContinue | Select-Object -Expand Source
Get-Command vim  -ErrorAction SilentlyContinue | Select-Object -Expand Source

Search for vim.exe

Get-ChildItem "C:\Program Files\Vim" -Recurse -Filter vim.exe -ErrorAction SilentlyContinue |
>>   Select-Object -First 5 -Expand FullName
C:\Program Files\Vim\vim91\vim.exe

For some reason vim or vim.exe does not work from terminal, here is how to setup vim for terminal

  • Press Windows + R and enter sysdm.cpl
  • Go to AdvancedEnvironment Variables
  • Under User variables, select Path and click Edit
  • Click New and add:
    C:\Program Files\Vim\vim91\
    
  • Click OK, OK, OK until all dialogs are closed

That’s it.

Open Windows Terminal (or PowerShell / cmd) and run:

vim --version

Empty Recycle Bin

Clear-RecycleBin -Force