update
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
# Using configuration file for most of the settings
|
||||
$ConfigFile="${PSScriptRoot}/../Data/config.json"
|
||||
$Config=(Get-Content -Path $ConfigFile|ConvertFrom-Json).AppConfig
|
||||
|
||||
#Load Configuration File as Variables
|
||||
$ConfigVars=($Config | Get-Member -Membertype Noteproperty).Name
|
||||
ForEach ($ConfigVar in $ConfigVars) {
|
||||
Set-Variable -Name $ConfigVar -Value $Config.${ConfigVar}.Value
|
||||
}
|
||||
|
||||
#Remove temporary variables we don't need to reused thse
|
||||
Remove-Variable -Name Config,ConfigFile,ConfigVar,ConfigVars
|
||||
|
||||
$TimeZone=(timezone).id
|
||||
|
||||
# We need to declare the fields for syncing.
|
||||
$SyncFields = @("Admins", "AgencyName","App","City","Cluster","Environment","SRM_Request","SRM_Status","SupportHours","TeamLead","VLAN","VMHost" )
|
||||
$SNSyncFields=@("Environment","AgencyName")
|
||||
|
||||
#Default before set
|
||||
$VerbosePreference = "SilentlyContinue"
|
||||
$InformationPreference = "SilentlyContinue"
|
||||
$DebugPreference = "SilentlyContinue"
|
||||
|
||||
# Sets logging levels for cmdlets.
|
||||
Switch ($VerboseLevel) {
|
||||
0 { $VerbosePreference = "SilentlyContinue" }
|
||||
1 { $VerbosePreference = "Continue" }
|
||||
2 { $VerbosePreference = "Continue" ; $InformationPreference = "Continue" }
|
||||
3 { $VerbosePreference = "Continue" ; $InformationPreference = "Continue"; $DebugPreference = "Continue" }
|
||||
}
|
||||
|
||||
# Overrides email SNMPTO
|
||||
if ($TestMode -eq $True) {
|
||||
Write-Information "Test Mode - On"
|
||||
$SNMPTo = $TestModeAdmin
|
||||
}
|
||||
Reference in New Issue
Block a user