Skip to content

Commit a64e372

Browse files
authored
Update Install-O365Monitor.ps1
1 parent 8b951a8 commit a64e372

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Install-O365Monitor.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Param(
2222
[Switch]$Force
2323
)
2424

25-
$ConfigFile = $PWD.Path + '\O365Monitor-Config.xml'
25+
$ConfigFile = "$PSScriptRoot\O365Monitor-Config.xml"
2626
$CommonName = 'O365Monitor'
2727
$StartDate = (Get-Date).ToString("yyyy-MM-dd")
2828
$EndDate = (Get-Date).AddDays(385).ToString("yyyy-MM-dd")
@@ -244,7 +244,7 @@ Disconnect-MgGraph | Out-Null
244244

245245
# If the config file exists, rename it first.
246246
if (Test-Path -Path $ConfigFile -PathType Leaf){
247-
Remove-Item -Path ".\$ConfigFile.bak" -Force | Out-Null
247+
Remove-Item -Path "$ConfigFile.bak" -Force | Out-Null
248248
Rename-Item -Path $ConfigFile -NewName "$ConfigFile.bak"
249249
}
250250

0 commit comments

Comments
 (0)