Get Current User name in PowerShell

To get current username in PowerShell, use whoami, GetCurrent() method of WindowsIdentity .Net class or Get-WMIObject cmdlet in PowerShell. In PowerShell, there are different ways …

Read more