Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADMX extension: Configure TimeValue $MaximumExecutionMinutes #17

Closed
EUCweb opened this issue Mar 13, 2018 · 1 comment
Closed

ADMX extension: Configure TimeValue $MaximumExecutionMinutes #17

EUCweb opened this issue Mar 13, 2018 · 1 comment

Comments

@EUCweb
Copy link
Owner

EUCweb commented Mar 13, 2018

From @matthias-schimm on March 12, 2018 20:21

For some customers is possible to configure the $MaximumExecutionMinutes = 60 through ADMX

Copied from original issue: #11

@EUCweb
Copy link
Owner Author

EUCweb commented Mar 25, 2018

PARAM(
[parameter()][string]$CheckProcess,
[parameter()][int]$CheckProcessId,
[parameter(Mandatory=$True)][string]$ActivityText,
[parameter()][int]$MaximumExecutionMinutes,
[parameter()][switch]$TerminateRunawayProcess
)
Write-BISFFunctionName2Log -FunctionName ($MyInvocation.MyCommand | % {$_.Name}) #must be added at the begin to each function
$a=0
if ($MaximumExecutionMinutes) {
$MaximumExecutionTime = (Get-Date).AddMinutes($MaximumExecutionMinutes)
Write-BISFLog "Maximum execution time will internal override with the value of $MaximumExecutionTime minutes"
} ELSE {
IF ($LIC_BISF_CLI_METCfg -eq "YES") {$MaximumExecutionMinutes = $LIC_BISF_CLI_MET}
IF ($LIC_BISF_CLI_METCfg -eq "NO") {$MaximumExecutionMinutes = 1440}
IF ($LIC_BISF_CLI_METCfg -eq "") {$MaximumExecutionMinutes = 60}
$MaximumExecutionTime = (Get-Date).AddMinutes($MaximumExecutionMinutes)
Write-BISFLog "Maximum execution time used the GPO value with $MaximumExecutionMinutes minutes"
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant