From cad054685a488de38a4ca2d139f70937b6c9ef86 Mon Sep 17 00:00:00 2001 From: dyoder Date: Mon, 26 Jul 2021 13:22:21 -0400 Subject: [PATCH] added new Output directory to root MSP directory moved InstalledSoftware.csv to new Output directory and added date stamp to filename --- Get-InstalledSoftware.ps1 | 3 ++- Tools.ps1 | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Get-InstalledSoftware.ps1 b/Get-InstalledSoftware.ps1 index f264577..91824e9 100644 --- a/Get-InstalledSoftware.ps1 +++ b/Get-InstalledSoftware.ps1 @@ -1,5 +1,6 @@ ## Specify output file to write data to -$FILE = "${Env:UserProfile}\Desktop\InstalledSoftware.csv" +$CurrentDateTime = Get-Date -Format "yyyyMMddHHmmssffff" +$FILE = "${OutputDirectory}\${CurrentDateTime}_InstalledSoftware.csv" ## Clear content of output file If ( Test-Path $FILE ) { Clear-Content -Path $FILE -Force } diff --git a/Tools.ps1 b/Tools.ps1 index 2079dd2..7f1ec78 100644 --- a/Tools.ps1 +++ b/Tools.ps1 @@ -4,6 +4,7 @@ $MSPName = "Emberkom" ## Setup the MSP management directories If ( Test-Path ${Env:ProgramData} ) {$RootDirectory = "${Env:ProgramData}\${MSPName}" } Else { $RootDirectory = "${Env:SystemDrive}\${MSPName}" } $ScriptsDirectory = "${RootDirectory}\Scripts" +$OutputDirectory = "${RootDirectory}\Output" $ToolsDirectory = "${RootDirectory}\Tools" $LogsDirectory = "${RootDirectory}\Logs"