How to do it...

Start PowerShell at the terminal, or use the PowerShell Integrated Console on VS Code.

  1. Run the following command:
Start-Transcript -Path ./command-transcript.txt
  1. You can also simply run the cmdlet without any arguments; it would automatically create a text file with an auto-generated file name. Get the current system date and time
Get-Date
  1. List out all the files and directories in the current location.
Get-ChildItem .
  1. Create a new directory.
New-Item test-transcript -ItemType Directory
  1. Create a new file within the directory.
New-Item -Path test-transcript/testing-transcript.txt -ItemType File
  1. Add content to the file.
@'
In publishing and graphic design, lorem ipsum is a placeholder text commonly used to demonstrate the visual form of a document without relying on meaningful content (also called greeking).
Replacing the actual content with placeholder text allows designers to design the form of the content before the content itself has been produced.
—Wikipedia
'@ | Out-File ./test-transcript/testing-transcript.txt -Append
  1. Delete the directory.
Remove-Item -Path ./test-transcript -Recurse
  1. Stop recording what you did.
Stop-Transcript
  1. You should have now received the location of the transcript file. Read the contents of the file.
Get-Content -Path ./command-transcript.txt
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.230.82