File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ Elevate($myinvocation.MyCommand.Definition)
1919
2020$host.ui.RawUI.WindowTitle = " Mika's reporting script"
2121
22+ # These variables are defined already here so that they are available also
23+ # when only running the Compress-ReportArchive below.
2224# $Downloads = ".\Downloads"
2325$Reports = " ${PSScriptRoot} \Reports"
2426$Timestamp = Get-Date - Format " yyyy-MM-dd_HH-mm"
@@ -112,6 +114,15 @@ if (Test-CommandExists "netsh") {
112114 Show-Output " The command `" netsh`" was not found."
113115}
114116
117+ $OpenVPNLogs = " ${UserDir} \OpenVPN\log"
118+ if (Test-Path " ${OpenVPNLogs} " ) {
119+ Show-Output " OpenVPN log folder found. Copying logs."
120+ New-Item - Path " ${Reports} " - Name " OpenVPN" - ItemType " directory" - Force | Out-Null
121+ Copy-Item - Path " ${OpenVPNLogs} \*" - Destination " ${Reports} \OpenVPN"
122+ } else {
123+ Show-Output " OpenVPN log folder was not found."
124+ }
125+
115126if (Test-CommandExists " powercfg" ) {
116127 Show-Output " Creating battery report."
117128 powercfg / availablesleepstates > " ${Reports} \powercfg_sleepstates.html"
Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ $DesktopPath = [Environment]::GetFolderPath([Environment+SpecialFolder]::Desktop
7171$StartPath = Get-Location
7272
7373# Define some useful variables
74- $RepoInUserDir = ([System.IO.DirectoryInfo ]" ${RepoPath} " ).FullName.StartsWith(([System.IO.DirectoryInfo ]" ${env: UserProfile} " ).FullName)
74+ $UserDir = ([System.IO.DirectoryInfo ]" ${env: UserProfile} " ).FullName
75+ $RepoInUserDir = ([System.IO.DirectoryInfo ]" ${RepoPath} " ).FullName.StartsWith($UserDir )
7576
7677# This will be filled by Get-InstalledSoftware
7778$InstalledSoftware = $null
You can’t perform that action at this time.
0 commit comments