/build/static/layout/Breadcrumb_cap_w.png

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’}
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

Answers (1)

Posted by: JasonEgg 6 years ago
Red Belt
1

Comments:
  • 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 6 years ago
 
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