# Dell Optimizer
If ( Test-Path "${Env:ProgramFiles}\Dell\DellOptimizer\do-cli.exe" ) { $DellOptimizerCli = "${Env:ProgramFiles}\Dell\DellOptimizer\do-cli.exe" }
ElseIf ( Test-Path "${Env:ProgramFiles(x86)}\Dell\DellOptimizer\do-cli.exe" ) { $DellOptimizerCli = "${Env:ProgramFiles(x86)}\Dell\DellOptimizer\do-cli.exe" }
If ( $DellOptimizerCli ) {
    Write-Output "Dell Optimizer"
    Try {
    # Disable Network Settings
    Write-Output "Disabling network settings"
    Start-Process -FilePath "C:\Program Files\Dell\DellOptimizer\do-cli.exe" -ArgumentList '/configure -name=Network.State -value=false' -Wait
    
    # Disable Presence Detection
    Write-Output "Disabling presence detection"
    Start-Process -FilePath "C:\Program Files\Dell\DellOptimizer\do-cli.exe" -ArgumentList '/configure -name=PresenceDetection.State -value=false' -Wait
    }
    Catch { Write-Error $_.Exception.Message }

} Else { Write-Output "Dell Optimizer command line application cannot be found!" }