First of all, lets see how to get a list of installed programs on a remote computer: Get-WmiObject Win32Product -ComputerName computername Select-Object -Property IdentifyingNumber, Name To find a specific program installed on a remote computer: Get-WmiObject Win32Product -ComputerName computername Where-Object.IdentifyingNumber -eq number Now, lets uninstall that program.If its an MSI package or a package that has a silent option, PowerShell should be able to take care of it.If the install package is already on the remote computer, Invoke-Command -ComputerName computer -ScriptBlock.Copy-Item -Path serversoftwaresophosetup.exe -ToSession session -Destination c:windowstempsophossetup.exe -Force.
WinRM needs to be enabled on the remote computer You need proper credentials to run the script on the remote computer. Un Dameware Remote Service How To Remotely DisableRelated Posts How To Remotely Disable Startup Programs on Windows 10 How To Patch and Verify Meltdown and Spectre Protection on Windows PCs How To Find If A Software Installed on Any Remote Computers How To Find Disk Capacity and Free Space of Remote Computers How To Tell If A Remote Computer Needs Reboot TAGS powershell uninstall Kent Chen 6 COMMENTS Chap Bin September 4, 2019 at 7:14 am Magnificent stuff Kent. Reply Tomas January 23, 2020 at 5:05 am hello, this commands only works on virtual machine but does not work on physical (localy) Get-WmiObject: Generic failure At line:1 char:1 Get-WmiObject Win32Product Select-Object -Property IdentifyingNum CategoryInfo: InvalidOperation: (:) Get-WmiObject, Managemen tException FullyQualifiedErrorId: GetWMIManagementException,Microsoft.PowerShell.C ommands.GetWmiObjectCommand Reply Kent Chen January 23, 2020 at 10:51 am It works on both physical and vms. Windows 7 computer though. Reply xavier April 13, 2020 at 11:01 am Line 6 Move-Item -Path c:windowstempsophossetup.exe need to be corrected to Move-Item -Path c:windowstempsophossetup.exe you forgot the after c. Reply Kent Chen April 13, 2020 at 2:20 pm Thank you for pointing it out. Its been fixed now. Reply DP July 22, 2020 at 3:38 pm Thanks for the post. Un Dameware Remote Service Download Smashing MagazineHow to include computer list from text file and then uninstall software remotely Reply LEAVE A REPLY Cancel reply Please enter your comment Please enter your name here You have entered an incorrect email address Please enter your email address here You Might Also Like How To Preview PowerShell Files in Windows Explorer How To Back Up Your Virtual Machines for Free What to Do When Having Trouble InstallingUninstall Programs Here is Recover Deleted Files with Windows File Recovery Tool Delete User Profiles on a Remote Computer in PowerShell Recent Posts How To Tell What AntiVirus Software Installed on a Remote Windows Computer How To Enable DNS over HTTPS (DoH) on Windows 10 or Edge Chromium How To Adjust Brightness of All External Monitors Download Smashing Magazine Desktop Wallpaper September 2020 Windows 10 Theme Looking For A Free Unlimited File Sync Tool Try Syncthing Facebook RSS Twitter Youtube Home About Us Contact Us Privacy Sitemap Copyright Next of Windows Powered by ionMag news theme.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |