Difference between revisions of "Venafi Scripts"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
``` | ``` | ||
$services = @("VED", "VenafiESTService", "VenafiLogServer") | $services = @("VED", "VenafiESTService", "VenafiLogServer") | ||
+ | # Stopped VenafiWcfHost Venafi MMC Wcf Host | ||
foreach ( $service in $services ){ | foreach ( $service in $services ){ | ||
Latest revision as of 21:24, 18 July 2022
$services = @("VED", "VenafiESTService", "VenafiLogServer") # Stopped VenafiWcfHost Venafi MMC Wcf Host foreach ( $service in $services ){ $hostPrefix = "MyhostPrefix" $count = 4 # $scriptBlock = "{hostname}" # $cmd = "hostname; pwd" $cmd = "sc.exe failure `"$service`" reset=3600 actions= restart/30000" for ($i = 1; $i -lt ($count+1); $i++){ if($i -lt 10){ $hostSuffix = "0$i" } else { $hostSuffix = "$i" } $h = "${hostPrefix}$hostSuffix" Invoke-Command -ScriptBlock {powershell -c "$Using:cmd"} $h } }
Get-Service | ? { $_.DisplayName -like "venafi*" } | % { Stop-Service $_ }
Expand-Archive '.\Venafi Trust Protection Platform 22.2.0.zip' -DestinationPath 22.2.0