Version 1.4b
This commit is contained in:
@@ -1128,21 +1128,20 @@ function Initialize-EnterpriseLog {
|
|||||||
[string]$Name = "VeeamInstall"
|
[string]$Name = "VeeamInstall"
|
||||||
)
|
)
|
||||||
|
|
||||||
if ([string]::IsNullOrWhiteSpace($Script:LogDirectory)) {
|
$LogDirectory = "C:\ProgramData\VeeamInstaller\Logs"
|
||||||
$Script:LogDirectory = "C:\ProgramData\VeeamInstaller\Logs"
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!(Test-Path $Script:LogDirectory))
|
if(!(Test-Path $LogDirectory))
|
||||||
{
|
{
|
||||||
New-Item `
|
New-Item `
|
||||||
-Path $Script:LogDirectory `
|
-Path $LogDirectory `
|
||||||
-ItemType Directory `
|
-ItemType Directory `
|
||||||
-Force |
|
-Force |
|
||||||
Out-Null
|
Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$Script:LogFile = Join-Path `
|
$Script:LogFile = Join-Path `
|
||||||
-Path $Script:LogDirectory `
|
-Path $LogDirectory `
|
||||||
-ChildPath (
|
-ChildPath (
|
||||||
$Name +
|
$Name +
|
||||||
"_" +
|
"_" +
|
||||||
@@ -1150,12 +1149,14 @@ function Initialize-EnterpriseLog {
|
|||||||
".log"
|
".log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
New-Item `
|
New-Item `
|
||||||
-Path $Script:LogFile `
|
-Path $Script:LogFile `
|
||||||
-ItemType File `
|
-ItemType File `
|
||||||
-Force |
|
-Force |
|
||||||
Out-Null
|
Out-Null
|
||||||
|
|
||||||
|
|
||||||
return $Script:LogFile
|
return $Script:LogFile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user