/build/static/layout/Breadcrumb_cap_w.png

Software Deployment Question


Kace K1000 PowerShell Script

06/19/2018 1308 views
In the SCCM world, some people are using the following PowerShell scripts to disable update checks on VLC media player. I know there are other ways to get this done but so far this method seems to work better for us. Could someone please provide me guidance on how to get this done via Kace K1000?


Discovery Script

If(Test-Path $env:APPDATA\vlc\vlcrc)
{
$UpdateCheck1 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-notif” | Select-Object Line
$UpdateCheck2 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-privacy-ask” | Select-Object Line
$UpdateCheck3 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-days” | Select-Object Line

if(($UpdateCheck1.Line -eq ‘qt-updates-notif=0’) -and ($UpdateCheck2.Line -eq ‘qt-privacy-ask=0’) -and ($UpdateCheck3.Line -eq ‘qt-updates-days=0’))
{Write-Host ‘Compliant’}
else
{Write-Host ‘Non-Compliant’}
}
else
{Write-Host ‘Compliant’}

Remediation Script

If(Test-Path $env:APPDATA\vlc\vlcrc)
{
$UpdateCheck1 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-notif”
$UpdateCheck11 = $UpdateCheck1.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck11”, ‘qt-updates-notif=0’ | Set-Content $env:APPDATA\vlc\vlcrc
$UpdateCheck2 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-privacy-ask”
$UpdateCheck22 = $UpdateCheck2.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck22”, ‘qt-privacy-ask=0’ | Set-Content $env:APPDATA\vlc\vlcrc
$UpdateCheck3 = Select-String $env:APPDATA\vlc\vlcrc -pattern “qt-updates-days”
$UpdateCheck33 = $UpdateCheck3.Line
(Get-Content $env:APPDATA\vlc\vlcrc) -replace “$UpdateCheck33”, ‘qt-updates-days=0’ | Set-Content $env:APPDATA\vlc\vlcrc
}

Thanks,
Sam
0 Comments   [ + ] Show comments

Comments


All Answers


  • Just remember if you use replication shares that you will need to wait on replication of the script. You will only waste that 45 minutes of your life once!

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ