Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

export the result of the script.

$
0
0

How can i export the result to .CSV or HTML.

thanks in advance

 

$comps = Get-content C:\Serverlist.txt 

 

foreach ($comp in $comps) {

 

invoke-command -computer $comp { get-process BServer | stop-process -force}

 

invoke-command -computer $comp { get-process FServer | stop-process -force}

 

Invoke-Command {start-service PaperWork_POffice_Branch_Server –passthru} –comp $comp

 

Invoke-Command {start-service PaperWork_POffice_File_Server –passthru} –comp $comp

 

}


Viewing all articles
Browse latest Browse all 6937

Trending Articles