Script installazione client sep
Script installazione client sep (symantec endpoint security)
Questo script offre un metodo per l’installazione del client sep in modalità silente tramite uno script powershell. Puù essere utilzzato nel caso in cui non sia presente una softwre distribution all’interno del dominio di di macchine Windows.
$credential = Import-CliXml -Path "e:\script\cred_s720624.xml"
$session = New-PSSession -ComputerName -Credential $credential
$file = "\\10.64.89.208\e$\script_install_client_symantec\setup.exe"
$path = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"
$filter="ConsentPromptBehaviorAdmin|PromptOnSecureDesktop"
$files = Get-Content -Path .\host_to_install.txt
foreach ($host_item in $files)
{
Copy-Item -Path $file -ToSession $session -Destination 'c:\temp'
Invoke-Command -Session $session -ScriptBlock {Set-ItemProperty -Path $path -Name "ConsentPromptBehaviorAdmin" -Value "0"}
Invoke-Command -Session $session -ScriptBlock {Set-ItemProperty -Path $path -Name "PromptOnSecureDesktop" -Value "0"}
Invoke-Command -Session $session -ScriptBlock {(Get-ItemProperty $path).psobject.properties | where {$_.name -match $filter} | select name,value}
Invoke-Command -Session $session -ScriptBlock {c:\temp\setup.exe /s}
Invoke-Command -Session $session -ScriptBlock {Start-Sleep -Seconds 10}
Invoke-Command -Session $session -ScriptBlock {Get-Process msiexec}
}
Read-Host -Prompt "Premere Invio per uscire"
# Powered by @jacopo.pica