WhoamI on Windows
To connect to a Windows machine using PowerShell from a NoMachine client on a MacBook Pro, you need the correct username for authentication. Here’s how to find it:
Method 1: Check from NoMachine (GUI)
-
Connect to the Windows box using NoMachine.
-
Open a Command Prompt (
cmd.exe) or PowerShell. -
Run the following command to get the username:
whoamiThis will return something like:DOMAIN\UsernameorCOMPUTERNAME\Username
Method 2: Check from Windows Settings
-
Open Start Menu → Settings.
-
Go to Accounts → Your info.
-
The username will be displayed there.
Method 3: Check from Task Manager
-
Press
Ctrl + Shift + Escto open Task Manager. -
Go to the Users tab.
-
Find the logged-in user.
Method 4: Check from Remote Desktop (if applicable)
If you also have RDP access, you can:
-
Open Remote Desktop Connection (
mstscon Windows). -
When prompted for credentials, it usually pre-fills the username.
Once You Have the Username, Connect via PowerShell
From your MacBook Pro, open Terminal and use PowerShell Remoting:
ssh username@windows-ip
Or, if PowerShell Remoting is enabled:
Enter-PSSession -ComputerName windows-ip -Credential username
This requires WinRM to be enabled on the Windows machine.
Let me know if you need more details! 🚀
Imported from rifaterdemsahin.com · 2025