You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Map your WSL isntance to a drive letter.
For instance my W: drive is mapped to \wsl$\Ubuntu
Run Get-Content with the -Path and -Wait parameter to print out the text file and monitor it for changes:
Example: Get-Content -Path "W:\home\joseph\myvoipms\cron.log" -Wait
Expected behavior
Get-Content should wait for new content in the file, and print it as it comes in.
Actual behavior
Get-Content prints out the file, but then says "Get-Content: Incorrect function."
Name Value
---------
PSVersion 7.4.3
PSEdition Core
GitCommitId 7.4.3
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
The text was updated successfully, but these errors were encountered:
Wait is a dynamic parameter that the FileSystem provider adds to the Get-Content cmdlet. This parameter works only in file system drives. Wait can't be combined with Raw.
Prerequisites
Steps to reproduce
Map your WSL isntance to a drive letter.
For instance my W: drive is mapped to \wsl$\Ubuntu
Run Get-Content with the -Path and -Wait parameter to print out the text file and monitor it for changes:
Example: Get-Content -Path "W:\home\joseph\myvoipms\cron.log" -Wait
Expected behavior
Get-Content should wait for new content in the file, and print it as it comes in.
Actual behavior
Get-Content prints out the file, but then says "Get-Content: Incorrect function."
Error details
Environment data
Visuals
No response
The text was updated successfully, but these errors were encountered: