title: How to Retrieve name of current Windows User (AD or local) using Python?
body: <p>How can I retrieve the name of the currently logged in user, using a python script? The function should work regardless of whether it is a domain/ad user or a local user.</p>