How can I use python to read windows eventlog from a remote machine?
<p>I'm working on retrieving the Windows eventlog from a remote machine using Python.</p>

<p>I tried the following code:</p>

<pre><code>import win32evtlog 

server = 'aRemoteMachineHostName' 
logtype = 'System' 
hand = win32evtlog.OpenEventLog(server,logtype)
total = win32evtlog.GetNumberOfEventLogRecords(hand)
</code></pre>

<p>and I get an access denied error.</p>

<p>Then I tried use win32security.Logon to do the authentication before I access the eventlog.
But I find in the win32security.Logon document, it says the API only supports local logon.</p>

<p>So, I'm a little bit stuck here. I wonder whether Python can do a remote Windows logon?
Any tips or hints will be helpful.</p>

<p>Thanks.</p>
