mirror of
https://github.com/serialexperiments0815/PowershellExcercises.git
synced 2026-11-07 12:55:30 +00:00
Corrected many "./" path entries to $($PSScriptRoot).
This commit is contained in:
parent
0e1b23f888
commit
9dc9824b12
9 changed files with 17 additions and 17 deletions
|
|
@ -3,8 +3,8 @@
|
|||
# Test-Path added to avoid Remove-Item error on first execution.
|
||||
# Remove-Item was added to avoid complications with Export-Csv function.
|
||||
# Delimiter was added to not have all properties stacked in the same column.
|
||||
if (Test-Path "./InstalledPrograms.csv"){
|
||||
Remove-Item -Path "./InstalledPrograms.csv"
|
||||
if (Test-Path "$($PSScriptRoot)/InstalledPrograms.csv"){
|
||||
Remove-Item -Path "$($PSScriptRoot)/InstalledPrograms.csv"
|
||||
}
|
||||
Get-Package | Select-Object -Property Name, Version, Summary |
|
||||
Export-Csv -Path "./InstalledPrograms.csv" -NoTypeInformation -Delimiter ";"
|
||||
Export-Csv -Path "$($PSScriptRoot)/InstalledPrograms.csv" -NoTypeInformation -Delimiter ";"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue