Jump to content

Recommended Posts

Posted
Hi, Is it possible to remotely execute powershell commands from KSC custom tools? I found this topic but it didn't help me: https://forum.kaspersky.com/index.php?app=forums&module=forums&controller=topic&id=382442&tab=comments#comment-2751988 I need to launch some powershell commands, for example a software list like this: Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table –AutoSize > D:\swlist.txt Other example, pending updates. $update = new-object -com Microsoft.update.Session $searcher = $update.CreateUpdateSearcher() $pending = $searcher.Search("IsInstalled=0") foreach($entry in $pending.Updates) { Write-host "Title: " $entry.Title Write-host "Downloaded? " $entry.IsDownloaded Write-host "Description: " $entry.Description foreach($category in $entry.Categories) { Write-host "Category: " $category.Name } Write-host " " } Thank you
Posted
PS: these commands don't require administrator privileges
Nikolay Arinchev
Posted
Hi, Yes, that is possible. You have to add a custom tool and specify tool location.
Posted
Hi, Yes, that is possible. You have to add a custom tool and specify tool location.
Therefore is it possible to launch a ps1 file or the command must be directly write on the field? Thanks in advance
Nikolay Arinchev
Posted
Yes, you can create a batch file to be distributed over network, but please notice, that it will be launced with Local System account.
Posted
Yes, you can create a batch file to be distributed over network, but please notice, that it will be launced with Local System account.
Do you have a link to a guide? I was not able to use it
Posted
I solved except for Ps1 file execution.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...