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

Powershell code to print/break lines after each value read from text file

$
0
0

I am trying to create a script that can get all the servers patches installations in our environment. The script I am running is giving me continuous output without printing any success messages after each server read from text file. I have fairly written a basic script! doh.

I wanted some code to be inserted in my script to either print each server details with a break or Success message before printing another server continuously in CLI. Or to print each server in each separate text file. Please find the below Code:

$Computers = gc ServerListFile.txt

Get-hotfix -computer $Computers

Please Give me some input at least, to try and get it done.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



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