Skip to content

Commit

Permalink
Combine PowerShell Functions into 1 script for RMM
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 11, 2024
1 parent 6d0c488 commit caa2412
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions EasyWarrantyCheck_RMM.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function Get-Warranty {

# Web Driver mode, Edge or Chrome ( Edge Beta Support )
[Parameter(Mandatory = $false, ParameterSetName = 'Default')]
[Parameter(Mandatory = $false, ParameterSetName = 'CentralNinja')]
[ValidateSet('Chrome', 'Edge')]
[String]$Seleniumdrivermode = 'Chrome',

Expand All @@ -46,6 +47,7 @@ function Get-Warranty {
[bool]$ForceUpdate = $false,

# Custom Machine Details, available in both sets
[Parameter(Mandatory = $false, ParameterSetName = 'Default')]
[Parameter(Mandatory = $false, ParameterSetName = 'CentralNinja')]
[String]$Serial = 'Automatic',

Expand Down Expand Up @@ -1638,11 +1640,11 @@ function Stop-SeleniumModule {

}
}
Remove-Module Selenium -Force -ErrorAction SilentlyContinue | Out-null
Remove-Module Selenium -Force -ErrorAction SilentlyContinue -Verbose:$false | Out-null
}
if($WebDriver -eq "Chrome"){
$driver.quit()
Remove-Module Selenium -Force -ErrorAction SilentlyContinue | Out-null
Remove-Module Selenium -Force -ErrorAction SilentlyContinue -Verbose:$false | Out-null
}
}

Expand Down

0 comments on commit caa2412

Please sign in to comment.