Get the whole screen content in PowerShell
hi everyone
senario:
i'm connecting remote server , operation on there.
lets have function called do-operation in server 1. , ps1 file in server 2 called winrs/winrm server 1.
can see process going on in server 2. if there error displayed on screen in server 1 powershell.
problem:
i want store whole screen content in server 1 's powershell
example:
tried use below cases not work fine case; stored part of it, (i create batch file , run "wimrm/winrs" using invoke-expression connect server 2:
assume whole process in server 1 done in do-process function (created me) , want whole content of powershell stored in text file.
do-process | out-file -filepath d:\log.txt
do-process > log.txt
senario:
i'm connecting remote server , operation on there.
lets have function called do-operation in server 1. , ps1 file in server 2 called winrs/winrm server 1.
can see process going on in server 2. if there error displayed on screen in server 1 powershell.
problem:
i want store whole screen content in server 1 's powershell
example:
tried use below cases not work fine case; stored part of it, (i create batch file , run "wimrm/winrs" using invoke-expression connect server 2:
assume whole process in server 1 done in do-process function (created me) , want whole content of powershell stored in text file.
do-process | out-file -filepath d:\log.txt
do-process > log.txt
http://gallery.technet.microsoft.com/scriptcenter/en-us/e8fbffde-7d95-42d9-81de-5eb3d9c089e0
refer above link
complete solution in there
refer above link
complete solution in there
Windows Server > Management
Comments
Post a Comment