Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues 56 and 57: Support executing PAL.ps1 from different directory and allow PS session log retention #58

Merged
merged 3 commits into from Sep 22, 2021

Conversation

VonOgre
Copy link
Contributor

@VonOgre VonOgre commented Mar 6, 2020

Reintroduced capabilities added originally in PR#12, but lost during the v2.8.1 release.

Added support for calculating relative paths to various threshold files based on the location of PAL.ps1 instead of the PowerShell session's current working directory. This allows for PAL to be executed from anywhere without issue, which is beneficial for larger automation.

Added support for NOT clearing the PowerShell session at the beginning of execution, so a bigger automation script doesn't lose everything prior to PAL starting.

Re-enabled the debug logging to the user's temp directory, but added a timestamp to the file name, so that each execution doesn't wipe out the previous log.

Resolves #56
Resolves #57

…irectory

Reintroduce ClearLog parameter to skip clearing the powershell session if appropriate
Reenable debug log with timestamps for files
If ($(Test-FileExists $XmlInheritance.FilePath) -eq $True)
$inheritedXml = $($XmlInheritance.FilePath)
If(-not ([string]::IsNullOrWhiteSpace($inheritedXml))){
$inheritedXml = Resolve-Path "$PSScriptRoot\$inheritedXml"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using $PSScriptRoot throughout makes the relative paths rooted to whatever the containing directory is for PAL.ps1

Copy link
Owner

@clinthuffman clinthuffman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the assistance! Sorry for the delay, I never received a notification about this and just now found it.

@clinthuffman clinthuffman merged commit 7cfe6d8 into clinthuffman:master Sep 22, 2021
@VonOgre
Copy link
Contributor Author

VonOgre commented Sep 23, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants