79767340

Date: 2025-09-17 12:53:13
Score: 2
Natty:
Report link

The thing that jumps out to me is that you are using positional parameters instead of specifying them, and you have -Append first. I've never used Out-File to a UNC path personally. Has this worked in the past and all of the sudden stopped working?

Like what was already said we need to know what kind of object the $test variable holds. Maybe try sending somehting other than an empty row to it or at least put a space between the double quotes.

Write-Output " " | Out-File -FilePath "\\Server\Shared\$test.txt" -Append

$test | Get-Member

Reasons:
  • RegEx Blacklisted phrase (2): working?
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Vern_Anderson