Kace K1000 PowerShell Script

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’}
{Write-Host ‘Non-Compliant’}
{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


0 Comments   [ + ] Show comments

Answers (1)

Posted by: JasonEgg 2 years ago
Red Belt

  • 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! - cstewy 2 years ago

Don't be a Stranger!

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

Sign up! or login


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