Change user command to switch a Terminal Services server to Install mode.

KB 320185

How to put a Terminal Services server in Install mode.

You will need to switch to install mode, to install or remove programs on a terminal server.

The method I use the most is :
Open command prompt as administrator

Type:         change user /install
This will change the server to install mode.

Now your ready to install applications.

Switch Terminal Services to Execute Mode, when you are finished adding or removing programs.

Open command prompt as administrator

Type:         change user /execute

Users can now log in and start using the new applications

Trouble shooting a Disconnected Host in VMware vCenter

When your ESXi hosts are all setup up in vCenter and using HA and DRS but a blip happens, the power goes or  a host has a moment “not responding”.

disconnected host

In this  scenario we powered off the ESXi host.

What can you check?

Possible options. Try reconnecting the host if there has been no other changes

normal state reconnect

Watch the status bar for progress

Reconnecting host

What if it fails to connect like in the image below

failed to connect

  1. Don’t forget a few basic connectivity checks like…Can you ping the host?
  2. Can you connect to the ESXi host by DNS name or IP & local user and password using the vSphere client?
  3. Can you connect to any VMs which were / are still running on the disconnected host?
  4. Can you restart the management service on the ESXi host?
  5. Can you ilo to the ESXi host? Any errors /events logged on the host
  6. Any network switch down?
  7. Any SAN issues?

These are just a rough guide, it is no responsibility of the Author if you try any of these actions. Try at your own risk.

Trouble shooting VMware Virtual Center failing to start

We restarted the Virtual Center server during a routine maintenance window.

As a rough / quick test we then tried to connect via the client. To our shock, it didn’t connect

Client connection fails

How to Trouble shoot …..Where should you look next ?

Services?

Manual Service

Check for a stopped service on the vCenter server.

Start vcenter service

start vc service

In this scenario, check SQL , in the log you can see there is a SQL DB connection issue

VC no SQL connection

 

 

For Loop command to list users with sessions on servers

Problem :  Users/Admins disconnect from sessions on servers. How to get a list of users logged on to server active and disconnected

Simple Solution!

Create a file call servers.txt   – save in c:\temp

(possibly dsquery computer -name * >servers.txt    note your will need to delete all detail except server name)

Create a batch file call : listloggedinUsers.bat   – save in c:\temp

In the listloggedinUsers.bat type the following

for /f %%s in (servers.txt) do (echo %%s & qwinsta /server:%%s)

Save the bat file

Load command prompt as administrator.

Type
c:\temp\listloggedinusers.bat >> users_date_time.txt

This out put shows all 3389 connections. ie. RDP sessions

 

Disable inactive computers in AD

I would be tempted to run it manually in two parts.. that sounds a little cautious I know..

From your DC you can run

CMD ( as admin )
dsquery computer -inactive 8
(this lists the inactive computers- this list can include serveres!!!)

This will list the computers which have been inactive for 8 weeks or more.

Then you can choose to manually select the highlighted computers (from the query) in AD right click disable.
Or run    dsquery computer -inactive 8 | DSMOD computer -disabled yes

This will error if there is nothing to update “dsquery computer -inactive 8 | DSMOD computer -disabled yes”

I would not schedule this to run automatically.. Just in case it bins a server.. even though servers should never been offline for 8 weeks