Adding a PowerShell command to the right-click menu

Started by Egil

Egil

Adding a PowerShell command to the right-click menu   01 February 2016, 23: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   01 February 2016, 23: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 find a solution faster if you try the forum search, have a look at the knowledge base, or check the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • Write in English. 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: