File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
5.1/Microsoft.PowerShell.Utility
7.4/Microsoft.PowerShell.Utility
7.6/Microsoft.PowerShell.Utility Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -180,11 +180,13 @@ objects to an existing file.
180180``` powershell
181181$AppService = Get-Service -DisplayName *Application* |
182182 Select-Object -Property DisplayName, Status
183+
183184$AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation
184185Get-Content -Path .\Services.Csv
185186
186187$WinService = Get-Service -DisplayName *Windows* |
187188 Select-Object -Property DisplayName, Status
189+
188190$WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append
189191Get-Content -Path .\Services.Csv
190192```
@@ -224,6 +226,7 @@ unexpected output is received, troubleshoot the pipeline syntax.
224226``` powershell
225227Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear |
226228 Export-Csv -Path .\DateTime.csv -NoTypeInformation
229+
227230Get-Content -Path .\DateTime.csv
228231```
229232
@@ -235,6 +238,7 @@ Get-Content -Path .\DateTime.csv
235238``` powershell
236239Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear |
237240 Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
241+
238242Get-Content -Path .\FTDateTime.csv
239243```
240244
Original file line number Diff line number Diff line change @@ -183,11 +183,13 @@ objects to an existing file.
183183``` powershell
184184$AppService = Get-Service -DisplayName *Application* |
185185 Select-Object -Property DisplayName, Status
186+
186187$AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation
187188Get-Content -Path .\Services.Csv
188189
189190$WinService = Get-Service -DisplayName *Windows* |
190191 Select-Object -Property DisplayName, Status
192+
191193$WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append
192194Get-Content -Path .\Services.Csv
193195```
@@ -227,6 +229,7 @@ unexpected output is received, troubleshoot the pipeline syntax.
227229``` powershell
228230Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear |
229231 Export-Csv -Path .\DateTime.csv -NoTypeInformation
232+
230233Get-Content -Path .\DateTime.csv
231234```
232235
@@ -238,6 +241,7 @@ Get-Content -Path .\DateTime.csv
238241``` powershell
239242Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear |
240243 Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
244+
241245Get-Content -Path .\FTDateTime.csv
242246```
243247
Original file line number Diff line number Diff line change @@ -182,11 +182,13 @@ objects to an existing file.
182182``` powershell
183183$AppService = Get-Service -DisplayName *Application* |
184184 Select-Object -Property DisplayName, Status
185+
185186$AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation
186187Get-Content -Path .\Services.Csv
187188
188189$WinService = Get-Service -DisplayName *Windows* |
189190 Select-Object -Property DisplayName, Status
191+
190192$WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append
191193Get-Content -Path .\Services.Csv
192194```
@@ -226,6 +228,7 @@ unexpected output is received, troubleshoot the pipeline syntax.
226228``` powershell
227229Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear |
228230 Export-Csv -Path .\DateTime.csv -NoTypeInformation
231+
229232Get-Content -Path .\DateTime.csv
230233```
231234
@@ -237,6 +240,7 @@ Get-Content -Path .\DateTime.csv
237240``` powershell
238241Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear |
239242 Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
243+
240244Get-Content -Path .\FTDateTime.csv
241245```
242246
You can’t perform that action at this time.
0 commit comments