We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b951a8 commit a64e372Copy full SHA for a64e372
Install-O365Monitor.ps1
@@ -22,7 +22,7 @@ Param(
22
[Switch]$Force
23
)
24
25
-$ConfigFile = $PWD.Path + '\O365Monitor-Config.xml'
+$ConfigFile = "$PSScriptRoot\O365Monitor-Config.xml"
26
$CommonName = 'O365Monitor'
27
$StartDate = (Get-Date).ToString("yyyy-MM-dd")
28
$EndDate = (Get-Date).AddDays(385).ToString("yyyy-MM-dd")
@@ -244,7 +244,7 @@ Disconnect-MgGraph | Out-Null
244
245
# If the config file exists, rename it first.
246
if (Test-Path -Path $ConfigFile -PathType Leaf){
247
- Remove-Item -Path ".\$ConfigFile.bak" -Force | Out-Null
+ Remove-Item -Path "$ConfigFile.bak" -Force | Out-Null
248
Rename-Item -Path $ConfigFile -NewName "$ConfigFile.bak"
249
}
250
0 commit comments