question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get-Item P:\ath\To\A\Directory -Streams * does not work

See original GitHub issue

I tested this in PowerShell 5.1, and PowerShell 7 preview 3.

If I add an Alternate Data Stream to a directory, verify with streams.exe that it exists, and then try to list the ADS stream for the directory itself with PowerShell

Get-Item P:\ath\To\A\Directory -Streams * 

does not work, and appears to return nothing

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:44 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
vexx32commented, Sep 18, 2020

The code difference is quite small; basically WriteError(someErrorRecord) is non-terminating, and ThrowTerminatingError(someErrorRecord) is terminating.

2reactions
iSazonovcommented, Sep 18, 2020

Thinking more I believe:

  • Get-Item -Path * -Stream * or Get-Item -Path "exact_name" -Stream * shouldn’t write errors
  • Get-Item -Path * -Stream "exact_name_without_wildcards" should write non-terminating errors if the stream is not found.
Read more comments on GitHub >

github_iconTop Results From Across the Web

Get-Content (Microsoft.PowerShell.Management)
Stream is a dynamic parameter that the FileSystem provider adds to the Get-Content cmdlet. This parameter works only in file system drives on...
Read more >
Add-Content (Microsoft.PowerShell.Management)
Specifies an alternative data stream for content. If the stream does not exist, this cmdlet creates it. Wildcard characters are not supported. Stream...
Read more >
Main classes
We're on a journey to advance and democratize artificial intelligence through open source and open science.
Read more >
GitPython Documentation
GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.
Read more >
API Reference — GitPython 3.1.32 documentation
Returns: File Object compatible stream to the uncompressed raw data of the object ... If an item with the given name already exists,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found