Using Vbscript , we are getting current user email id. It is as simple as with following lines.
Option Explicit
Dim objUser, objADSysInfo
Set objADSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objADSysInfo.UserName)
WScript.Echo objUser.Mail
How to achieve the same using powershell?