Requirements To run this script you must have the execution policy configured to RemoteSigned or something similar to allow you to run powershell cmdlets. In addition you need WinRM 2.0 enabled. Code Block $compName = read-host "Enter the name of a computer: " $RS = new-pssession -computername $compName invoke-command -session $RS -scriptblock {$Client = new-object -com Altiris.AeXNSClient -strict} invoke-command -session $RS -scriptblock {$Client.ClientPolicyMgr.Refresh()} remove-pssession -session $RS |
When you run this script it will prompt you to enter a computer name, then will create a new WinRM session to the machine, execute the Altiris Agent update agent DCOM and then close out the WinRM session. This is great for the HelpDesk to quickly get jobs that have been queued up for the machine without granting them access to the Administrative Console.
No comments:
Post a Comment