Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell Results Output

$
0
0

I am using the following script to import a computer list and remove specific desktop icons:

Get-Content C:\Data\PS\Imports\24.csv |
      ForEach-Object{
           Get-Item "\\$($_.Name)\c$\users\Public\Desktop\Series *.lnk" -EA 0 |
                      Remove-Item}

I would like to log the success and failures. I have used the following 3 methods, none of which are working for me. Redirect and Transcript create blank files, while export creates nothing.

> "C:\Output.txt"

Start-Transcript -Path "C:\Output.txt" -Append

| Export-csv -Path "C:\Output.csv"


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>