Run Remediation (Script) On Demand in Intune

Поділитися
Вставка
  • Опубліковано 12 лип 2024
  • In this video, we show how you can run on demand a #PowerShell #Remediation Script in #Intune
    This feature is free now in Preview but will require an extra license/cost in the future to use.
    Extremely powerful if you build up a lot of support Remediation scripts for your helpdesk that they can run remotely on clients to fix certain known/reoccurring issues such as run SFC, Dism healthcheck, clear cache, repairs - anything needed.
    Scripts mentioned in the video:
    #Detection Script to find Z-Zip
    Software Detection Script to see if 7-Zip is installed
    Author: John Bryntze
    Date: 4th July 2023
    Variables
    $JBNAppID = "7zip.7zip"
    $JBNAppFriendlyName = "7-Zip"
    Help System to find winget.exe
    Set-Location -Path ("$env:ProgramW6432\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe")
    Check locally installed software version
    $JBNLocalInstalledSoftware = .\winget.exe list -e --id $JBNAppID --accept-source-agreements
    #If not installed exit here...
    if($JBNLocalInstalledSoftware[-1] -eq 'No installed package found matching input criteria.')
    {
    write-host "Don't find the App"
    exit 0
    #The app is NOT installed...
    }
    else
    {
    write-host "Found the app!"
    exit 1
    #The app is installed!
    }
    #Remediation Script to remove 7-Zip
    Software Remediation Remove 7-Zip
    Author: John Bryntze
    Date: 4th July 2023
    Variables
    $JBNAppID = "7zip.7zip"
    Help System to find winget.exe
    Set-Location -Path ("$env:ProgramW6432\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe")
    Run upgrade of the software
    .\winget.exe uninstall -e --id $JBNAppID --silent --accept-source-agreements

КОМЕНТАРІ • 19