Link to home
Start Free TrialLog in
Avatar of Jimmy Wang
Jimmy Wang

asked on

set-log Microsoft-Windows-PrintService/Operational /e:true

i'm trying to enable this "set-log Microsoft-Windows-PrintService/Operational /e:true" logging for each server and looking for how can I run for multiple server.

is it possible to do something like this to import. I know my line is not correct but looking for help here what I should correct to run multiple remote computer to enable this logging ?


----------------------------------------------------------------------
$servers = Import-csv "c:\Servers.txt"


foreeach($server in $servers){
     $cn=$server.Computername
     wevtutil set-log Microsoft-Windows-PrintService/Operational /e:true /r:"$cn"
}

----------------------------------------------------------------------
SOLUTION
Avatar of J0rtIT
J0rtIT
Flag of Venezuela, Bolivarian Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Jimmy Wang (https:#a42345284)
-- Jose [MCSE] Ortega C (https:#a42339746)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

Pber
Experts-Exchange Cleanup Volunteer