@@ -249,7 +249,7 @@ Function Log-Error{
249249 . DESCRIPTION
250250 Writes the passed error to a new line at the end of the specified log file
251251
252- . PARAMETER LogPath
252+ . PARAMETER FullLogPath
253253 Mandatory. Full path of the log file you want to write to. Example: C:\Windows\Temp\Test_Script.log
254254
255255 . PARAMETER ErrorDesc
@@ -276,7 +276,7 @@ Function Log-Error{
276276 Purpose/Change: Added debug mode support. Added -ExitGracefully parameter functionality
277277
278278 . EXAMPLE
279- Log-Error -LogPath "C:\Windows\Temp\Test_Script.log" -ErrorDesc $_.Exception -ExitGracefully $True
279+ Log-Error -FullLogPath "C:\Windows\Temp\Test_Script.log" -ErrorDesc $_.Exception -ExitGracefully $True
280280 #>
281281
282282 [CmdletBinding ()]
@@ -293,7 +293,7 @@ Function Log-Error{
293293
294294 # If $ExitGracefully = True then run Log-Finish and exit script
295295 If ($ExitGracefully -eq $True ){
296- Log- Finish - LogPath $FullLogPath
296+ Log- Finish - FullLogPath $FullLogPath
297297 Breaåk
298298 }
299299 }
@@ -344,10 +344,10 @@ Function Log-Finish{
344344 Purpose/Change: Added log line count limit.
345345
346346 . EXAMPLE
347- Log-Finish -LogPath "C:\Windows\Temp\Test_Script.log"
347+ Log-Finish -FullLogPath "C:\Windows\Temp\Test_Script.log"
348348
349349. EXAMPLE
350- Log-Finish -LogPath "C:\Windows\Temp\Test_Script.log" -NoExit $True
350+ Log-Finish -FullLogPath "C:\Windows\Temp\Test_Script.log" -NoExit $True
351351 #>
352352
353353 [CmdletBinding ()]
@@ -436,7 +436,7 @@ Function Get-LTData {
436436 }
437437
438438 Catch {
439- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to run query : $query `n $Error [0]"
439+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to run query : $query `n $Error [0]"
440440 }
441441 }
442442
@@ -572,7 +572,7 @@ Function Export-LTScript {
572572 Catch {
573573 $ErrorMessage = $_.Exception.Message
574574 $FailedItem = $_.Exception.ItemName
575- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to remove folder data from XML: $FailedItem , $ErrorMessage `n $Error [0]"
575+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to remove folder data from XML: $FailedItem , $ErrorMessage `n $Error [0]"
576576 }
577577 }
578578 Else {
@@ -595,7 +595,7 @@ Function Export-LTScript {
595595 Catch {
596596 $ErrorMessage = $_.Exception.Message
597597 $FailedItem = $_.Exception.ItemName
598- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to remove folder data from XML: $FailedItem , $ErrorMessage `n $Error [0]"
598+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to remove folder data from XML: $FailedItem , $ErrorMessage `n $Error [0]"
599599 }
600600 }
601601 Else {
@@ -631,7 +631,7 @@ Function Export-LTScript {
631631 Catch {
632632 $ErrorMessage = $_.Exception.Message
633633 $FailedItem = $_.Exception.ItemName
634- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to save script: $FailedItem , $ErrorMessage `n $Error [0]"
634+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to save script: $FailedItem , $ErrorMessage `n $Error [0]"
635635 }
636636 }
637637 Else {
@@ -662,7 +662,7 @@ Function Export-LTScript {
662662 Catch {
663663 $ErrorMessage = $_.Exception.Message
664664 $FailedItem = $_.Exception.ItemName
665- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to save script: $FailedItem , $ErrorMessage `n $Error [0]"
665+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to save script: $FailedItem , $ErrorMessage `n $Error [0]"
666666 }
667667 }
668668
@@ -682,7 +682,7 @@ Function Export-LTScript {
682682 Catch {
683683 $ErrorMessage = $_.Exception.Message
684684 $FailedItem = $_.Exception.ItemName
685- Log- Error - LogPath $FullLogPath - ErrorDesc " Error durring log/backup directory creation: $FailedItem , $ErrorMessage `n $Error [0]"
685+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Error durring log/backup directory creation: $FailedItem , $ErrorMessage `n $Error [0]"
686686 }
687687
688688 Log- Write - FullLogPath $FullLogPath - LineValue " Getting list of all scripts."
@@ -719,7 +719,7 @@ Function Export-LTScript {
719719 Catch {
720720 $ErrorMessage = $_.Exception.Message
721721 $FailedItem = $_.Exception.ItemName
722- Log- Error - LogPath $FullLogPath - ErrorDesc " Unable to update config with last export date: $FailedItem , $ErrorMessage `n $Error [0]"
722+ Log- Error - FullLogPath $FullLogPath - ErrorDesc " Unable to update config with last export date: $FailedItem , $ErrorMessage `n $Error [0]"
723723 }
724724
725725 Log- Finish - FullLogPath $FullLogPath
0 commit comments