Quantcast
Channel: Shavlik User Community : All Content - Ivanti Patch for Windows
Viewing all articles
Browse latest Browse all 2126

Deploying patches via Powershell

$
0
0

I am using the following code to add some servers to a pre-production group and then want to kick off a scan and then deploy the missing patches to the server. This seems to be working fine if I run the powershell on server which has Ivanti patch management installed however if I try to run the same script by kicking it off from my local machine using either.

 

Invoke-Command-ComputerNameIVANTI01-ScriptBlock {

 

Code below

}

 

Or when using

Enter-PSSession-ComputerNameIVANTI01

 

Code below

 

***** Working running from local Ivanti patch management server *****

 

Import-ModuleSTProtect-PassThru

Write-Host-ForegroundColorGreen"Adding server to patch management group"

 

 

$Csv= @()

 

$Csv=Import-CsvC:\Scripts\Server_Build_Config_v1.0.csv

 

$machine=$Csv.Machine

 

Add-MachineGroupItem-NamePre-Production-EndpointNames$machine

 

sleep5

 

Write-Host-ForegroundColorGreen"Scanning server for security patches"

 

$PatchScan=Start-PatchScan-EndpointNames$machine-TemplateName"Security Patch Scan"

 

 

Write-Host-ForegroundColorYellow"Waiting for scan to complete"

 

$PatchScan|Wait-PatchScan

 

Write-Host-ForegroundColorGreen"Scan Completed"

 

Write-Host-ForegroundColorYellow"Deploying security patches"

 

$PatchScan|Start-PatchDeploy-TemplateName"No restart"

 

 

 

 

 

 

 

I am getting the following error message:

 

Exception calling "QueueAssessment" with "7" argument(s): "There was no endpoint listening at net.pipe://localhost/ST/Console/Engines/EngineOrchestrator/ that could accept the message. This is often caused by an

incorrect address or SOAP action. See InnerException, if present, for more details."

At C:\Program Files\LANDESK\Shavlik Protect\PSModules\STProtect\STProtect.PatchScan.psm1:154 char:2

+     [ST.PSModule.Protect.PatchApiProxy]::QueueAssessment($credentialU ...

+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : EndpointNotFoundException

 

 

 


Viewing all articles
Browse latest Browse all 2126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>