Ekspor (0) Cetak
Buka Semua
Expand Minimize
EN
Konten ini tidak tersedia dalam bahasa Anda dan berikut adalah versi bahasa Inggris.

Using the Tee-Object Cmdlet

Display Data and Save That Data with One Command

The Tee-Object cmdlet enables you to display data in the Windows PowerShell window and to save that same data to a text file, all with a single command. For example, this command uses the Get-Process cmdlet to retrieve information about all the processes currently running on the computer, then uses Tee-Object to simultaneously display the data on-screen and save that data to the file C:\Scripts\Test.txt:



Get-Process | Tee-Object -file c:\scripts\test.txt

Tee-Object Aliases
  • tee

Related Links

Apakah Anda menilai ini bermanfaat?
(1500 karakter tersisa)
Terima kasih atas tanggapan Anda
Tampilkan:
© 2015 Microsoft