Run PowerShell (and Command Prompt) Administratively

KB ID 0000988

Problem

We had the ‘run as’ service way back in Windows 2000, so the concept of running a command window ‘as administrator’ should not be difficult to understand. But the amount of times I tell people ‘You need to run that as administrator’, and they reply ‘I AM an administrator’ is far too high. With PowerShell theres no way of knowing, and with command prompt the differences are subtle.

Solution

There’s a myriad of different ways to launch an administrator command window, here are a few, If I’ve missed any let me know.

Launch Powershell in Administrative Mode 

Powershell administrative mode (from Within Powershell)

If you’re already in Powershell you can open an administrative Powershell window, with the following command;

[box]

Start-Process PowerShell -Verb RunAs

[/box]

Powershell Administrative Mode (from Start Menu)

Option 1: From Start/Search > Powershell > Right Click Windows PowerShell > Run as administrator.

Option 2: Start > Right Click Windows PowerShell > Run as administrator.

Option 3: Start > Windows PowerShell > Windows Powershell > Run as Administrator.

Option 4: Right Click Start Menu (or Press Windows+X) > Window Powershell (Admin).

Powershell Administrative Mode (from Task Manager)

Launch Task Manger > File > Run new task > Powershell > Tick ‘Create this task with administrative privileges’.

Powershell Administrative Mode (from Windows Explorer)

From Windows Explorer > File > Open Windows PowerShell as administrator.

Launch Command Prompt in Administrative Mode 

Administrator Command Prompt From Start Menu. (Windows 10 and Server 2016/2019)

From the Start/Search option > Type cmd > Then right click Command Prompt and select ‘Run as administrator’.

Command Prompt (Admin) – Windows 10 (& Server 2016/2019) 

Right click the Start Button > Command Prompt (Admin)

Command Prompt (Admin) – Windows 8 (& Server 2012) Quick Links Menu

Press Windows Key+X > Select Command Prompt (Admin)

Administrator Command Prompt From Start Menu. (Windows 8 and Server 2012)

If you have the new Windows 8/2012 Start Menu (that we can’t call Metro any more) then type ‘command’ in the search window, then either right click and select ‘Run as administrator’, or press Ctrl+Shift+Enter to launch.

If you have the traditional start menu enabled or are running Windows 7/Vista, you can type command in the search/run box, then

Create An Always Run As Administrator Command Prompt Shortcut

1. Right click and empty area of your desktop > New > Shortcut.

2. Set the location to ‘cmd’ > Next > Call it Admin Command > Finish.

3. Right click your new shortcut > Properties.

4. Shortcut > Advanced > Run as administrator > Apply > OK.

 

Launch Admin Command Prompt from Task Manager.

Launch Task Manager (Ctrl+Shift+Esc) > File > Run new task > cmd > Tick ‘Create this task with administrative privileges’.

Launch Command Prompt ‘As Administrator’ From Command/Run.

I’m not a fan of this, in fact I only include it here for completeness, you can call a command windows and run it as administrator from command (or the run box (Windows Key+R). The reason I don’t like this is, you need to enter the machines local administrators password for it to work.

[box]

runas /user:%computername%administrator cmd

[/box]  

If theres any I’ve missed feel free to drop me an email, and I will update the article.

Related Articles, References, Credits, or External Links

NA

How to Tell if Windows is 32 or 64 bit

KB ID 0000153

Problem

If you want to know what version (x64 or x86) of Windows you are running, then this is the simplest way to find out.

Solution

Under accessories run system information;

Under System Type: If it says x86 then it’s 32 bit.

However if it says x64 then it’s 64 bit.

Windows XP and Server 2003

1. Click Start > Run > sysdm.cpl {enter} > General Tab.

Windows XP x32 (x86) and Windows XP x64

Windows Server 2003 x32 (x86) and Windows Server 2003 x64

Windows Vista / Windows 7 / Server 2008

1. Start > Control Panel > System.

Windows Vista and Windows 7

Windows Server 2008

 

Related Articles, References, Credits, or External Links

NA

Windows – Lost / Forgotten Password?

KB ID 0000755

Problem

There are many reasons why you might want to do this, someone has managed to change a user password and that person is not available, you might simply have forgotten it. Or you might have been given a machine, or bought one from ebay that has come without a password. Also there have been a few times when a user has looked me in the eye and said “I’m typing my password in, but it’s not working”, I have never seen a password change on it’s own, so I will just put that down to the evil password gremlins.

The procedure will also work on the Windows local administrators password, just bear in mind that his account is disabled by default, (after Windows 8). This procedure will not work if the machine in question has had its hard drive encrypted using BitLocker.

You can use this procedure to blank, (or reset) a Domain Controllers DSRM (Directory Services Restore Mode) password.

You can avoid this procedure if you have access to another account on this machine that has administrative access. If you can log on as an administrator, then you can change the password of other local accounts on the affected machine without the need to do this.

Solution

How to Burn the ISO Disc Image

1. Download the Password Reset CD Image.

2. Download ImgBurn and install, Launch the program, if it does not look like this you need to select View >EX-Mode-Picker. Select the ‘Write image file to disc’ option.

2. The file you downloaded is a zip file that contains the disk image, you will need to extract the image from the zip file (i.e. drag it to your desktop). From within ImgBurn launch the browse option and navigate to the disk image you have just extracted > Open.

3. Select the burn to disc icon (Note: This will be greyed out, until there is a blank CD in the drive). The image is very small, it will not take long to burn.

Carry Out a Windows 8 Password Reset.

This procedure uses the boot CD you have just created, for it to work you need to make sure the machine will attempt to boot to its CD/DVD Drive before it boots to its hard drive. (Or it will simply boot into Windows again). This change in ‘Boot Order’ is carried out in the machines BIOS, how you enter this varies depending on machine vendor, when you first turn on the machine watch for a message that looks like Press {key} to enter Setup. Typically Esc, Del, F1, F2, or F9. When in the BIOS locate the boot order and move the CD/DVD Drive to the top of the list.

1. Boot your machine from your freshly burned CD, when you see this screen simply press {Enter} to boot.

2. Depending on how many disks/partitions you have it will discover them and assign a number to each one, here I only have 1 so I will type ‘1 {Enter}’.

Note: You may see a small 300Mb partition, ignore that. You may also see your machines recovery partition if it has one, if that’s the case you may have to carry out some trial and error to get the right one.

3. The system is set to look for the default registry location C:WindowsSystem32Config so simply press {Enter}. If it fails at this point you selected the wrong drive/partition.

4. We want password reset so select option 1.

5. We will be editing user data and passwords, so again select option 1.

6. You will be presented with a list of the user objects that it can locate, here I want to reset the password for the ‘PeteLong’ user object so simply type in the username you want to edit.

Note: As mentioned you can see here the administrator account is disabled, if you want to work with that account, you will need to unlock and enable it on the next screen before you blank or change the password.

7. You can choose option 2 and type in a new password, but I’m going the blank the password, then change it when I get back into the machine by selecting option 1.

8. To step back you need to enter an exclamation mark.

9. Enter a ‘q’ to quit.

10. To write the changes you have made enter a ‘y’.

11. As long as you are happy, and have no other accounts that need changing, enter ‘n’.

12. Now remove the boot CD, and press Ctrl+Alt+Delete to reboot the machine.

13. As the user object we are dealing with was the last one that has logged on, it will select that account as soon as the computer boots, and now it has a blank password it will automatically log on.

14. To change the password, press Ctrl+I > Change PC settings.

15. Users > Create a password.

16. Type and confirm your new password, and enter a password hint > Next.

17. Log off the account and test the new password.

 

Related Articles, References, Credits, or External Links

NA

VMware Workstation – Deploying Server 2012 and Windows 8 ‘Linked Clones’ from Templates

KB ID 0000953 

Problem

VMware Workstation, is a great test tool, if i need to take a look at some new software, or plan how I’m going to do a job, and I don’t have access to the ESX server, or test bench, it’s a great tool to have on my laptop.

If you build machines form scratch, every time you need one it can take a while. To address that you can create a template and deploy machines from that. To make things even more efficient you can make then ‘linked clones’. If you use VDI you will probably be aware of linked clones, they use the hard drive of the machine they were created from, and maintain a ‘delta disk’ that holds the differences, this make them very efficient at using hard drive space, (which is good if you are running on a laptop!)

Solution

1. I’ve titled this Windows 8 and Server 2012, but this process works for just about any modern version of Windows. Build the machine that will be the template, and install all the latest updates. Locate sysprep.exe uisually in C:WindowsSyste32Sysprep, and run it. Ensure the ‘Generalize’ option is selected, and the shutdown option is set to ‘Shutdown’.

2. Once finished the machine will shutdown, in VMware Workstation right click the VM > Snapshot > Take Snapshot > Give the snapshot a sensible name > Take Snapshot.

3. Once complete > Right Click the VM again > Settings > Options Tab > Advanced > Select ‘Enable Template mode (to be used for cloning) > OK.

4. Now every time you want a new VM simply right click the template > Manage > Clone > When the wizard starts > Next.

5. Choose the snapshot name you picked in step 2 > Next > Linked Clone (if you choose full clone it creates a complete new machine and will take a LOT of system resources) > Next > Give it a name > Finish.

6. Power on your new machine and it will run the mini windows setup, and behave like a completely new VM.

Related Articles, References, Credits, or External Links

NA

Cannot Open a Console Session in the VMware VI Client on Windows 8

KB ID 0000677 

Problem

Mostly my conversion to Windows 8 has been pretty painless, the only thing that wont work is the VMware VI client cant open a console session to the VMs on my ESX server.

Error
The VMRC console has disconencted…attempting to reconnect

This happens because the IE10 that comes with Windows 8 does NOT LIKE the requests the VI client is sending to the Internet Explorer plug-in.

Update 08/03/13 – This problem has now been fixed! Download the latest 5.1 version of the VI client. (see screenshot).

Solution

Work-Around 1 Use VMware workstation (Note: scroll down for a permanent fix)

Until either Microsoft or VMware change something then we are stuck! however there is a work around. if you have VMware Workstation (download the trial it will keep you ticking over till the problem is fixed!).

1. Launch VMware workstation > File > Connect to Server > Enter your ESX/vCenter server details > Connect.

Note: You may need to accept the certificate warning if you are using self signed certificates.

2. Now you can open a console session to your virtual machines.

Work-Around 2 Use VMware Guest Console

Download and run VMware Guest Console > Connect to to a host or vCenter, and you can access the guest machines consoles from there.

Permanent Fix

Sorry, the only way to fix this (at time of writing) is to upgrade to vSphere 5.1 AND install the 5.1 version of the vSphere client. (You can’t point the 5.1 client at a 5.0 host, it automatically launches the 5.0 version of the VI client).

Note: You will need to update vCenter to 5.1 as well for that to work!

Problem Resolved

Update to the latest VI client, and the problem will cease.

 

Related Articles, References, Credits, or External Links

NA

Microsoft Autoroute Install Errors (Windows 8)

KB ID 0000686 

Problem

I only use Autoroute once a month, (when I put my mileage in at work!). So this month I had a head slap when it was one of the bits of software I had forgotten to install on my freshly rebuilt laptop. So I fired up the setup for Autoroute 2007 and it failed.

So I moaned and was furnished with a shiny new copy of Autoroute 2011. But when I tried to install it, this happened.

Microsoft Autoroute 2011 Setup One of the prerequisite components failed to install. Setup will now exit.

Solution

It installed fine on my colleagues laptop so the problem had to be something to do with me. I did manage to get the product installed by running the data.msi file and installing the product that way, this got me further but then I got this error,

Microsoft Autoroute A licensing initialisation error has occurred. Please contact customer support for more assistance. Error 0x80070005

I got round that by installing in compatability mode, and running the install from command line admin mode. (Press Windows Key+X).

When I finally got the program installed, it would launch then crash. I installed it in a virtual machine and it worked faultlessly? I unistalled the product and compared my installed programs with the ones on my working virtual machine, I found that the C++ Distributable and the Microsoft Access database engine 2010 had different sizes? These were the prerequisites that Autoroute wanted to install at the very beginning.

So I unistalled everything ad tried to install the prerequisites manually, and then I located an issue,

You cannot install the 32 bit version of Microsoft Access Database Engine 2010 because you currently have 64-bit Office products installed.

So (begrudgingly) I removed x64 office and installed x86 Office.

Then the Access Database Engine Installed but the C++ wouldn’t! Because a newer version was installed.

A newer version of Microsoft Visual C++ 2010 Redistributable has been detected on the machine.

Microsoft could you please make this software MORE incompatible with MORE bits of your OWN software please, I’ve spent a large chunk of my morning trying to fix this now!

Fix the problem and get it installed.

1. Make sure you are running an x32 bit version of Office. (see above)

2. Press Windows Key+R > appwiz.cpl {enter}, Uninstall ALL the following if present,

Microsoft Office Access Database Engine. Microsoft Autoroute 2011. ALL Instanced off C++ Redistributable (all the x86 ones and All the x64 ones).

3. Reinstall Autoroute 2011.

4. Install the x64 bit C++ Redistributable from here.

5. It should now work fine.

 

Related Articles, References, Credits, or External Links

NA

Windows – ‘Where’s HyperTerminal?’

KB ID 0000101 

Problem

If like me you’ve spent a large part of your life hanging out of comms cabinets with serial cables programming routers, switches, and firewalls etc,then HyperTerminal will be an old friend. So I was a bit put out when I couldn’t find it in Vista, Windows 7, or Windows 8.

The Microsoft Web site says,

HyperTerminal is no longer part of Windows. However, you can use Telnet. It’s a simple, text-based program that you can use to connect to another computer over the Internet. If you previously used HyperTerminal to troubleshoot modem problems, use Phone and Modem Options instead:

Open Phone and Modem Options by clicking the Start button , clicking Control Panel, clicking Hardware and Sound, and then clicking Phone and Modem Options.

Note: You might need to provide information, such as your country or region and any special phone dialing rules, in the Location Information dialog box before you can access the Phone and Modem Options dialog box.

Well that’s all well and good, but I use it for Terminal Emulation – and I don’t want to fork out for expensive products like Prism or Host Suite.

Now I’ve seen some posts that claim you just need to copy hypertrm.dll and hypertrm.exe from an XP machine to the vista machines system32 directory then Start > Run > hypertrm {enter}

However – You can still download HyperTerminal as an application from the people who made it (Hilgraeve )

Solution

This one runs quite happily on Vista (Tested on Vista Ultimate V6.0 (Build 6000)), Windows 7 (Tested on Windows 7 x64 Ultimate (Build 7601)), Windows 8 (Tested on Windows 8 Pro (Build 9600)).

Note: Linux Users for a terminal console click here

Related Articles, References, Credits, or External Links

NA

Windows – Help! Where’s Telnet

Also see
Windows – ‘Telnet’ is not recognized as an internal or external command

KB ID 0000100

Problem

Telnet has not been in the default build of Windows since Windows Vista – this is troubling if your a tech and need to program things or test connectivity to mail servers etc etc…

Fear not you can still use telnet (if you prefer you can use Hyperterminal instead of basic telnet). You just need to load it in.

Solution

1.Click Start > Control Panel > Programs and Features.

2. Select “Turn WIndows Features on or Off”

3. Select “Telnet Client” > Then Click OK.

4.Windows will now install and enable Telnet so it is available from command line.

 

Related Articles, References, Credits, or External Links

NA

Windows – ipconfig – Stop the tunnel adaptors showing

KB ID 0000024

Problem

Windows ipconfig – annoyingly shows lots of info you don’t want to see, so you have to scroll to the top of the list to see your IP address all the time.

Solution

1. Stat > run > devmgmt.msc

2. View > Show Hidden Devices.

3. Expand Network Adaptors.

4. Disable all that start with isatap

5. Make sure your comms still work.

6. Re-run ifconfig.

Related Articles, References, Credits, or External Links

NA

Windows – ‘Telnet’ is not recognized as an internal or external command

KB ID 0000455

Problem

Telnet client from Windows, and have it as an “Optional Extra”. For most people that’s fine, but for anyone who programs network devices, or needs to test that ports are open, or test mail flow by telnet to port 25, that’s a pain.

Solution

Enabling Telnet – Windows 10

1. From PowerShell execute the following command;

[box]

dism /online /Enable-Feature /FeatureName:TelnetClient

[/box]

Enabling Telnet – Windows Server 2019, 2016, and 2012

1. From PowerShell execute the following command;

[box] Add-WindowsFeature Telnet-Client [/box]

Enabling Telnet – Windows 8, 7, Vista, and Server 2008 (NOT R2)

1. Open a command Window and execute the following command;

[box] pkgmgr /iu:"TelnetClient" [/box]

Or

2. Control Panel > Programs > Turn Windows features on or off > Select “Telnet Client” > OK.

Note: On Windows 8, Press Windows Key+X to get straight to control panel.

Enabling Telnet – Windows Server 2008 R2

1. From command line execute the following command;

[box] servermanagercmd -i telnet-client [/box]

Or

2. Launch Server Manager > Features > Add Features > Locate and select “Telnet Client”.

 

Related Articles, References, Credits, or External Links

NA