Have a Question?
< All Topics
Print

PowerShell Scripts for Computer Startup Script

Please refer to the following PowerShell scripts for computer startup script that we had prepared to archive some of our clients’ requirements

Script to verify whether the registry key exist in client workstations prior adding it

# Add LogoutTimeout for MFClient
if (Test-Path "HKLM:\SOFTWARE\Motive") {
    #Verify whether the value is defined previously
    if (Get-ItemProperty "HKLM:\SOFTWARE\Motive\M-Files\12.0.6400.37\Client\MFClient\" "AutomaticLogoutTimeoutInMinutes" -ErrorAction SilentlyContinue) {
        #Do Nothing
    } else {
        #Add the name with value 
        New-ItemProperty -Path "HKLM:\SOFTWARE\Motive\M-Files\12.0.6400.37\Client\MFClient" -Name "AutomaticLogoutTimeoutInMinutes" -Value 15 -PropertyType DWORD
    }      
}

Script to update Symantec Endpoint 14.0 to 14.2

#Update Symantec SEP from 14.0 to 14.2 
$InstalledSEPVersion = (Get-ItemProperty -path "HKLM:SOFTWARE\Symantec\Symantec Endpoint Protection\CurrentVersion").ProductVersion  

if ($InstalledSEPVersion -lt 14.2) { 
    Write-host -ForegroundColor RED "SEP Client Version" $InstalledSEPVersion "installed and will be upgraded to latest version"
    cmd /c "\\10.253.24.17\SEPClient142\setup.exe" /s /v'/qn /norestart'""
} Else {
    Write-Host -ForegroundColor Green "Latest SEP Client" $InstalledSEPVersion "Installed"
} 
Table of Contents
Scroll to Top