Tag Archives: Windows

Using Command Prompt to log off terminal / Remote User – #vDM30in30

A quick post. I had an issue the other day where I had to remotely administer a server on another site. When I logged in I was greeted by a white screen.

I needed to boot off this account and then log back in as the same user. Unfortunately this was the only administrator account available.

So I logged as a power user, opened up a command prompt by holding down “Shift” + Right Click to display the “Run as different user” option.

I then used the following options to view the logged in users and their session ID’s and used that information to log off the troublesome account.

SET PATH = %PATH%;C:WindowsSystem32DLLCache;
quser /Server:Localhost

This allows you to query the user  sessions on the local server or a remote device.

C:\>quser /?
Display information about users logged on to the system.

QUERY USER [username | sessionname | sessionid] [/SERVER:servername]

  username            Identifies the username.
  sessionname         Identifies the session named sessionname.
  sessionid           Identifies the session with ID sessionid.
  /SERVER:servername  The server to be queried (default is current).

From here, I take the Session ID and execute the “logoff” command pointing to the localhost.

logoff /Server:localhost 6 /v

Below are the options available with this command, the 6 represents the sessionID, and /v outputs the details to the console

C:\d.lewis>logoff /?
Terminates a session.

LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V] [/VM]

  sessionname         The name of the session.
  sessionid           The ID of the session.
  /SERVER:servername  Specifies the Remote Desktop server containing the user
                      session to log off (default is current).
  /V                  Displays information about the actions performed.
  /VM                 Logs off a session on server or within virtual machine. The unique ID of the session needs to be specified.

Finally hears a screenshot of my console window.

command line log off user.JP

Regards

Dean

Share

Profwiz: Migrating users profiles to a new domain

So a colleague of mine introduced me to this great tool, ForensiT User Profile Wizard.

We were migrating a customer from one domain to a new one, and there is a lot of data stored in the local profile of the users. So we needed a way to move this data into the new profile they will receive when the machine is moved into the new domain.

Note: This is about local machine profiles, and not those on a file server.

1. Login with existing domain\username on the machine, run the Profwiz.exe

  • Enter the new domain name
  • Enter the account name of the user on the name domain

profwiz-1

Continue reading Profwiz: Migrating users profiles to a new domain

Share

Server 2012 R1/R2 Creating a Network Team and enable Jumbo Frames

Server 2012 now supports NIC teaming, previously you could use HP tools to achieve this in Server 2008 R2 and below, but officially it was never supported by Microsoft.

Network teaming

Setting up a NIC team in Server 2012 is really simple. You just need to know where your Server is plugged into first on your switches.

1. Open Server Manager, Click on NIC Teaming

2014-08-07_15-03-21

2. Under tasks click new team

2014-08-07_15-08-26

3. Enter your name, select your adapters, and configure your advance network settings which we will talk about later.

And click OK and we are done.

Jumbo Frames Continue reading Server 2012 R1/R2 Creating a Network Team and enable Jumbo Frames

Share