Adding a PowerShell command to the right-click menu

Started by Egil

Egil

Adding a PowerShell command to the right-click menu   02 February 2016, 00:32

Hi,

Excellent Product!
Is there a way to add a PowerShell command to the right-click menu?
One can add command-lines but what about PowerShell?
in specific:. ([wmiclass]'ROOT\ccm\ClientSDK:CCM_SoftwareUpdatesManager').InstallUpdates([System.Management.ManagementObject[]] (get-wmiobject -query 'SELECT * FROM CCM_SoftwareUpdate' -namespace 'ROOT\ccm\ClientSDK'))
wich would force a install of all updates from a SCCM server point.

Egil
SoftPerfect Support forum - Andrew avatar image

Re: Adding a PowerShell command to the right-click menu   02 February 2016, 00:59

Try something like this:
powershell.exe -NoExit -NonInteractive Invoke-Command -ComputerName [host name] -ScriptBlock {{ your-commands-here }}

Reply to this topic

Sometimes you can get the answer faster if you try the forum search and/or have a look at the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **  **        **     **  **    **   *******  
 **     **  **        **     **   **  **   **     ** 
 **     **  **        **     **    ****    **     ** 
 *********  **        **     **     **      ******** 
 **     **  **         **   **      **            ** 
 **     **  **          ** **       **     **     ** 
 **     **  ********     ***        **      *******  

Message: