Update vCenter-SSL.ps1
This commit is contained in:
@@ -24,13 +24,14 @@ function Write-Log {
|
|||||||
param(
|
param(
|
||||||
[ValidateSet('INFO','WARN','ERROR')]
|
[ValidateSet('INFO','WARN','ERROR')]
|
||||||
[string]$Level,
|
[string]$Level,
|
||||||
[string]$Message
|
[string]$Message,
|
||||||
|
[string]$ForegroundColor
|
||||||
)
|
)
|
||||||
|
|
||||||
$ts = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
|
$ts = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
|
||||||
$line = "[$ts] $Level : $Message"
|
$line = "[$ts] $Level : $Message"
|
||||||
|
|
||||||
Write-Host $line
|
Write-Host $line -ForegroundColor $ForegroundColor
|
||||||
try {
|
try {
|
||||||
$dir = Split-Path $LogFile
|
$dir = Split-Path $LogFile
|
||||||
if (-not (Test-Path $dir)) {
|
if (-not (Test-Path $dir)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user