Category: Microsoft

Windows 2008 r2 Updates Reboot Loop

Tonight was our maintenance window at work, and I updated a bajillion virtual servers. Went OK save for one Windows 2008 r2 box that got stuck in a reboot loop. Updates failed, so I bounced the box to start fresh.  It would begin boot, show the dialogs for installing/configuring updates, reach “Configuring Updates: Stage 3 of 3,” and crater. Repeat infinitely. Thankfully the fix was easy. I mounted and booted from the 2008 Server ISO and:

  • Selected to Repair
  • Selected the Command Prompt option
  • Executed the command del C:\Windows\winsxs\pending.xml (actually because it was a virt the drive wasn’t C, but you get the idea)
  • Restarted and let it boot from the hard drive

After that it came up fine.

List of Roles and Features – Windows 2012

Need a quick list of currently installed roles and features on your Windows 2012 server?  Open a PowerShell prompt and put in the following:

1
Get-WindowsFeature -ComputerName COMPUTERNAME | Where-Object InstallState -eq Installed > installed.txt

It’ll give you a list similar to this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Display Name                                            Name                       Install State
------------                                            ----                       -------------
[X] File and Storage Services                           FileAndStorage-Services        Installed
    [X] Storage Services                                Storage-Services               Installed
[X] Web Server (IIS)                                    Web-Server                     Installed
    [X] Web Server                                      Web-WebServer                  Installed
        [X] Common HTTP Features                        Web-Common-Http                Installed
            [X] Default Document                        Web-Default-Doc                Installed
            [X] Directory Browsing                      Web-Dir-Browsing               Installed
            [X] HTTP Errors                             Web-Http-Errors                Installed
            [X] Static Content                          Web-Static-Content             Installed
        [X] Health and Diagnostics                      Web-Health                     Installed
            [X] HTTP Logging                            Web-Http-Logging               Installed
        [X] Performance                                 Web-Performance                Installed
            [X] Static Content Compression              Web-Stat-Compression           Installed
        [X] Security                                    Web-Security                   Installed
            [X] Request Filtering                       Web-Filtering                  Installed
        [X] Application Development                     Web-App-Dev                    Installed
            [X] .NET Extensibility 4.5                  Web-Net-Ext45                  Installed
            [X] ASP.NET 4.5                             Web-Asp-Net45                  Installed
            [X] ISAPI Extensions                        Web-ISAPI-Ext                  Installed
            [X] ISAPI Filters                           Web-ISAPI-Filter               Installed
    [X] Management Tools                                Web-Mgmt-Tools                 Installed
        [X] IIS Management Console                      Web-Mgmt-Console               Installed
[X] .NET Framework 3.5 Features                         NET-Framework-Features         Installed
    [X] .NET Framework 3.5 (includes .NET 2.0 and 3.0)  NET-Framework-Core             Installed
[X] .NET Framework 4.5 Features                         NET-Framework-45-Fea...        Installed
    [X] .NET Framework 4.5                              NET-Framework-45-Core          Installed
    [X] ASP.NET 4.5                                     NET-Framework-45-ASPNET        Installed
    [X] WCF Services                                    NET-WCF-Services45             Installed
        [X] HTTP Activation                             NET-WCF-HTTP-Activat...        Installed
        [X] Message Queuing (MSMQ) Activation           NET-WCF-MSMQ-Activat...        Installed
        [X] Named Pipe Activation                       NET-WCF-Pipe-Activat...        Installed
        [X] TCP Activation                              NET-WCF-TCP-Activati...        Installed
        [X] TCP Port Sharing                            NET-WCF-TCP-PortShar...        Installed
[X] Enhanced Storage                                    EnhancedStorage                Installed
[X] Message Queuing                                     MSMQ                           Installed
    [X] Message Queuing Services                        MSMQ-Services                  Installed
        [X] Message Queuing Server                      MSMQ-Server                    Installed
[X] SMB 1.0/CIFS File Sharing Support                   FS-SMB1                        Installed
[X] User Interfaces and Infrastructure                  User-Interfaces-Infra          Installed
    [X] Graphical Management Tools and Infrastructure   Server-Gui-Mgmt-Infra          Installed
    [X] Server Graphical Shell                          Server-Gui-Shell               Installed
[X] Windows PowerShell                                  PowerShellRoot                 Installed
    [X] Windows PowerShell 4.0                          PowerShell                     Installed
    [X] Windows PowerShell 2.0 Engine                   PowerShell-V2                  Installed
    [X] Windows PowerShell ISE                          PowerShell-ISE                 Installed
[X] Windows Process Activation Service                  WAS                            Installed
    [X] Process Model                                   WAS-Process-Model              Installed
    [X] Configuration APIs                              WAS-Config-APIs                Installed
[X] WoW64 Support                                       WoW64-Support                  Installed

To view in the prompt rather than dumping to a txt, remove the

1
> installed.txt

Wireless instability

I upgraded to a (hand me down) Dell Latitude E6530 not long ago.  I loaded it with Windows 8.1 (and Classic Shell, because one must).  I kept having wireless trouble – dropping off of networks.  It wasn’t isolated to my home.  What I believe I’ve determined is that, in a nutshell, Windows handling of N networks kind of sucks.  I disabled N and since then have been rock solid.

Navigate to your network adapters, right click on the wireless and choose Properties.  Beneath the adapter description choose Configure:

one

Choose the Advanced tab, then locate 802.11n Mode.  Switch the Value to Disabled and OK  your way out of all.

two

Windows 8 net shares: “An extended error has occurred,” “System error 2148073478”

So if you attempt to path to a share (eg: \\10.92.22.44\myshare) and are met with An extended error has occurred, or you use a DIR command with a network path and receive Invalid Signature, or your NET USE attempt is met with System error 2148073478 has occurred, here’s a fix.  Turn off required secure negotiation.  Copy the following into a text file and name it whateveryouwantto.reg.

1
2
3
4
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters]
"RequireSecureNegotiate"=dword:00000000

Double click the file to insert into the registry.

Or if you like, add it manually: open regedit and path to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters.  Create a DWORD value named RequireSecureNegotiate and leave it set to the default 00000000.

Windows 8 – Classic Shell and the Auto Reboot Irritation

I’ve moved on to Windows 8 on my primary laptop and desktop because, well, time marches on. Microsoft did well with 7. 8, not so much. 9 will probably be better. But I have to admit that things seem peppier on 8, especially my virtualbox vms. That may just be the byproduct of a fresh build though.

Two things I absolutely have to do with a fresh 8 install are to wrest control of the UI from the poorly conceived desktop-for-a-tablet, and stop the damned thing from force rebooting after updates.

When it comes to the UI, Classic Shell is your savior. And it’s free! Can’t recommend it enough.

Stopping the auto-reboot is a simple reg hack. In the editor, head to:

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU

Create the dword value NoAutoRebootWithLoggedOnUsers with a hexi value of 1. Or even easier, slap the below into a text file, rename it .reg and double click it to insert into the registry:

1
2
3
4
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAutoRebootWithLoggedOnUsers"=dword:00000001

Change the Windows Sticky Note Font

The Windows sticky note font is hideous.  Every rebuild I do (and I do many, as I use virtual machines) means me looking up how to change this font, because Microsoft hasn’t made it easy, or even possible, without drastic action.  It uses the font Segoe.  So you could go in and try to delete that font altogether (which could be an arduous process unto itself, as it’s protected).  It’s easier, however, to go into the registry and repoint that font title to another font (and this way you can choose the font you want for sticky notes.

  • Open the registry and head to HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
  • If you’re the nervous type, make a backup of this container of settings by right clicking the Fonts folder.
  • Find the item titled either Segoe Print (TrueType) or Segoe Script (TrueType) – it was the latter on my latest 7 64 bit build – and double click it.
  • Change the value to the .ttf of the font you’d prefer.  The example below changes it to the Consola font.  Remember, you’re pointing to the actual ttf file, not the friendly font name.
  • Repeat the process for Segoe Print Bold (TrueType) or Segoe Script Bold (TrueType).

fonts

That’s it.

Rebuilding Workstation Tips

New hard drives have arrived for my workstation and laptop.  They’re desperately overdue for a rebuild.  I love rebuilding and I hate it.  I love it because newly built machines run so smoothly, so cleanly, and have that new-machine smell.  It’s like virtual spring-cleaning.

I hate rebuilding because there’s so much stuff on my machines.  I’ve done a better job over the years of compartmentalizing (and even backing up) my data, but there’s still a lot of it – more than I’d like.  And the applications.  I use so many applications!  Every rebuild I think “I don’t need 3/4 of these apps.  I’m not putting them back on.”  But eventually, inevitably, as I work on this and that my installed app list grows, and I find myself installing a significant amount of the apps I insisted I wouldn’t.  Such is the curse of the breadth of things I work on, I suppose.  Just this morning a coworker from a completely different department commented that I’m the bitch for my department.  I work on whatever needs working on.  My boss generously calls me his “tool belt.”  Bitch is, honestly, more accurate.

Anyway, here are a few things that make my rebuild process less arduous.

  • I always build fresh onto new drives, holding onto the old ones.  Drives are cheap.  There’s nothing worse than blowing your drive away, rebuilding, and suddenly remembering something of Significant Importance™ that you forgot to back up.  Don’t sweat that.  Take the time to decrypt your current drives (you do encrypt them, don’t you) and set them aside. Build on a new drive, and keep your old ones around for a few weeks just to be sure.  Then you can wipe them and use them as scratch drives or external storage or replacement drives for that friend whose drive craps out or whatever.
  • Make a list of your installed applications.  It’s easy:
  1. Open a command prompt with elevated rights (Start > Run > type in CMD.  When the CMD icon appears, right click and Run as Administrator).
  2. Type in WMIC.
  3. Type in /output:c:\path\to\installed_list.txt product get name,version where path\to is, well, the path to wherever you want to write your installed_list.txt.
  4. Wait for it to finish. Enjoy list of apps.

I’ll add more to my list as my latest rebuilds commence.

Remote Software Scanner

I was writing a script that would scan remote Windows systems and return their installed software, complete with version information (a requirement), and quickly discovered that the process was more arduous than I had originally anticipated.  How to pull it?  WMI?  Use PowerShell?  Glean the information from the registry?  I fiddled with each and, given that I was working with a broad array of OS levels and a mix of 32 and 64 bit, each option had its annoying pitfalls.

Sometimes it’s better to let someone else do the work.  This is one of those times.

I found the EMCO Network Software Scanner, which does exactly what I need and much more, and amazingly enough is also free!

So much props to EMCO.  I’ll be keeping their commercial products in mind down the road.