PowerShell On Remote Computer

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

PowerShell on the Remote Computer

PowerShell

 Run PowerShell with Run as Administrator on server.


Enter-PSSession ComputerName

Exit-PSSession

 Check 360safe registry item


Get-Item Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\360safe

 Remove 360safe registry item


Remove-Item Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\360safe /f

 Automatic remove 360 reg. items for multiple computers, one computer name each line in
the txt file.
Get-Content .\computer.txt | Enter-PSSesion | reg delete
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\360safe /f

 Get installed software


Get-WmiObject -Class Win32_Product

 Get installed software by name


Get-WmiObject -Class Win32_Product | sort-object Name | select Name | where { $_.Name -Like
“*Kaspersky*”}

 Uninstall KAV by Name


$application = Get-WmiObject -Class Win32_Product -Filter "Name = 'Kaspersky Endpoint Security
10 for Windows'"
$application.Uninstall()

 Uninstall all software with the same name


Get-WmiObject -Class Win32_Product -Filter "Name = 'Kaspersky Endpoint Security 10 for
Windows'" | ForEach-Object { $_.Uninstall()}

You might also like