Here are 2 quick lines of code that help you uninstall a Program:
$Prog = Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -match “ProgramName”}
$Prog.Uninstall()
Reading time: 1 min
Here are 2 quick lines of code that help you uninstall a Program:
$Prog = Get-WmiObject -Class Win32_Product | Where-Object{$_.Name -match “ProgramName”}
$Prog.Uninstall()
If you need to deploy a MS Store App for example through Intune or GPO, here is my script:
First of all you need the App ID of the store app. Go to https://apps.microsoft.com/ search for the app and select it. In the URL you will see something like this: https://apps.microsoft.com/detail/9nw77489ngj0?hl=en-us&gl=US. 9nw77489ngj0 is the App ID.
Now the script:
Start-Transcript -Path “C:\3cx_msstore.log”
$appid=”9NW77489NGJ0″
winget install -e –id $appid –source msstore –accept-source-agreements –accept-package-agreements
winget upgrade –id $appid
Stop-Transcript
Having performance problems when deleting one single file or folder? File Explorer takes 2-3 seconds to “calculate” something before deleting? Deleting automatic destinations might help you out. I had a case where this file was 4MB big, which is a lot for only text/paths.
Delete everything under:
C:\Users\%username%\AppData\Roaming\Microsoft\Windows\Recent\AutomaticDestinations
The big file in question is f01b4d95cf55d32a.automaticDestinations-ms. You might want to delete this file only. But I deleted everything.
References:
If you are noticing seemingly random RDS session freezing on Windows 10/11 clients, this registry key might help. It disables the UDP protocol for RDP connections, which Microsoft enabled by default since Windows 10 1809/1909. I have had this issue occur on Windows 10 21H2.
HKLM\Software\Policies\Microsoft\Windows NT\Terminal Services\Client
DWORD fClientDisableUDP 1
A reboot of the machine was not needed, after closing the RDP session and reconnecting, TCP was being used. You can check which protocol is being used by clicking the symbol at the top:
References:
https://www.michaelmaw.com/how-to-fix-remote-desktop-freezing/
https://community.spiceworks.com/topic/2269433-remote-desktop-randomly-freezes-up