Deleting Temporary Internet Files from the Command Line

A quicky but a goody.  Sometimes you just need a quick way to delete temp files from IE.  In most cases for me its when I’m writing a webapp, so I’ve stuck this in the build properties:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

It doesn’t require elevated permissions, and has been tested on Vista and Windows 7.  Each command deletes the different types of data: temp files, stored form info, cookies etc.  Enjoy.

How UAC Actually Works

This post has had a few false starts.  It’s a tough topic to cover, as it’s a very controversial subject for most people still.  Hopefully we can enlighten some people along the way.

From a high level perspective, the UAC was developed to protect the user without necessarily removing administrative privileges.  Any change to the system required a second validation.  On older versions of Windows, an application running with administrative credentials could change any setting on the box.  Viruses and malware became rampant because of this openness, given that the average user had administrative credentials.  Most average users balked at the idea of having a limited user account, so Microsoft came up with an alternative for the new OS, Vista – a second form of validation.  You told the computer you wanted to make a change, it asked “are you sure?” 

Logically it makes sense.  Consider an instance where a devious application wanted to change some setting, and because Windows wanted to verify it’s ok to make this change it asked “are you sure?”  If you responded no, the change didn’t happen.  Simple enough.  However, here we start running into issues.  There are three perspectives to look at. 

First, the end user.  Simple changes to basic settings required validation.  This annoyed most of them, if not all of them.  They didn’t care why it was asking, they just wanted to delete shortcuts from their start menu.  Their reaction: turn off UAC.  Bad idea, but security loses when it comes to usability in the case of the end user.

Second, the irate IT Pro/Developer.  Most people working in IT make changes to system settings constantly.  Given that, the UAC would be seen many times in a day and it would, for lack of a better word, piss that person off.  They didn’t care what security it provided, it was a “stupid-useless-design” that shouldn’t have been created.  Their reaction: turn off UAC.  Once again security loses when it comes to usability.

Third, the knowledgeable IT Pro/Developer.  Not a lot of people fell into this category.  However, these tended to be the same type of people who fit into the Lazy Admin category as well.  When managed properly UAC wasn’t all that annoying because it wasn’t seen all that often.  Set-it-and-forget-it and you don’t ever see the prompt.  If you created the system image properly, you don’t have to constantly keep changing settings.  It’s a simple enough idea.

But…

Application compatibility is a pain.  Most applications didn’t understand the UAC, so they weren’t running with a validation and generally broke when they tried to do things they really shouldn’t be doing in the first place.  These are things like manipulating registry keys that don’t belong to them, writing to system folders, reading data from low-level system API’s etc.  This was reason #1 for disabling UAC.

And now…

With the general availability of Windows 7 in about 2.5 hours from now, it seems like a good time to discuss certain changes to UAC in the latest version of Windows.  The biggest of course being when Windows decides to check for validation.

Windows 7 introduces two new levels of the UAC.  In Vista there was Validate Everything or Off.  Windows 7 added “Do Not Notify Me When I Make Changes to Windows Settings”.  This comes into effect when the user makes a change to a Windows setting like display resolution.  Windows is smart enough to realize it’s the user making the change, and allows it.  It’s second additional level is the same as the first, except it doesn’t hide the desktop.

Now we get into some fun questions. 

  • How does Window’s know to not show the prompt?  It’s fairly straightforward.  All Window’s executables that were released as part of the OS are signed with a certificate.  All executables signed with this certificate are allowed to run if user started.  This is only true for Window’s settings though.  You cannot implement this with 3rd party applications.  There is no auto-allow list.
  • How does Window’s know it’s a user starting the application?  Lots of applications can mimic mouse movements or keyboard commands, but they occur at a higher application level than an actual mouse move.  Input devices like mice and keyboards have an extremely low level driver, and only commands coming from these drivers are interpreted as user input.  You cannot spoof these commands.
  • Can you spoof mouse/keyboard input to accept the UAC request?  No.  The UAC prompt is created in a separate Windows desktop.  Other well known desktops include the Locked screen, login screen, and the Cardspace admin application.  No application can cross these desktops, so an application running in your personal desktop cannot push commands into the UAC desktop.

Mark Russinovich has an excellent article in TechNet Magazine that goes into more detail about changes to the UAC.  Hopefully this post at least covered all sides of the UAC debate.

Ultimate Windows 7 Keyboard Shortcuts List

Got this list in an email earlier today.  Not sure the original source, as it was a copy/paste job, but holy crap what a list.  If someone can point out where it originated I will attribute it as necessary.

Ease of Access keyboard shortcuts

  • Right Shift for eight seconds: Turn Filter Keys on and off
  • Left Alt + Left Shift + PrtScn (or PrtScn): Turn High Contrast on or off
  • Left Alt + Left Shift + Num Lock: Turn Mouse Keys on or off
  • Shift five times: Turn Sticky Keys on or off
  • Num Lock for five seconds: Turn Toggle Keys on or off
  • Windows logo key + U: Open the Ease of Access Center

General keyboard shortcuts

  • F1: Display Help
  • Ctrl + C (or Ctrl + Insert): Copy the selected item
  • Ctrl + X: Cut the selected item
  • Ctrl + V (or Shift + Insert): Paste the selected item
  • Ctrl + Z: Undo an action
  • Ctrl + Y: Redo an action
  • Delete (or Ctrl + D): Delete the selected item and move it to the Recycle Bin
  • Shift + Delete: Delete the selected item without moving it to the Recycle Bin first
  • F2: Rename the selected item
  • Ctrl + Right Arrow: Move the cursor to the beginning of the next word
  • Ctrl + Left Arrow: Move the cursor to the beginning of the previous word
  • Ctrl + Down Arrow: Move the cursor to the beginning of the next paragraph
  • Ctrl + Up Arrow: Move the cursor to the beginning of the previous paragraph
  • Ctrl + Shift with an arrow key: Select a block of text
  • Shift + any arrow key: Select more than one item in a window or on the desktop, or select text within a document
  • Ctrl + any arrow key + Spacebar: Select multiple individual items in a window or on the desktop
  • Ctrl + A: Select all items in a document or window
  • F3: Search for a file or folder
  • Alt + Enter: Display properties for the selected item
  • Alt + F4: Close the active item, or exit the active program
  • Alt + Spacebar: Open the shortcut menu for the active window
  • Ctrl + F4: Close the active document (in programs that allow you to have multiple documents open simultaneously)
  • Alt + Tab: Switch between open items
  • Ctrl + Alt + Tab: Use the arrow keys to switch between open items
  • Ctrl + Mouse scroll wheel: Change the size of icons on the desktop
  • Windows logo key + Tab: Cycle through programs on the taskbar by using Aero Flip 3-D
  • Ctrl+ Windows logo key + Tab: Use the arrow keys to cycle through programs on the taskbar by using Aero Flip 3-D
  • Alt + Esc: Cycle through items in the order in which they were opened
  • F6: Cycle through screen elements in a window or on the desktop
  • F4: Display the address bar list in Windows Explorer
  • Shift + F10: Display the shortcut menu for the selected item
  • Ctrl + Esc: Open the Start menu
  • Alt + underlined letter: Display the corresponding menu
  • Alt + underlined letter: Perform the menu command (or other underlined command)
  • F10: Activate the menu bar in the active program
  • Right Arrow: Open the next menu to the right, or open a submenu
  • Left Arrow: Open the next menu to the left, or close a submenu
  • F5 (or Ctrl + R): Refresh the active window
  • Alt + Up Arrow: View the folder one level up in Windows Explorer
  • Esc: Cancel the current task
  • Ctrl + Shift + Esc: Open Task Manager
  • Shift when you insert a CD: Prevent the CD from automatically playing
  • Left Alt + Shift: Switch the input language when multiple input languages are enabled
  • Ctrl + ShiftL: Switch the keyboard layout when multiple keyboard layouts are enabled
  • Right or Left Ctrl + Shift: Change the reading direction of text in right-to-left reading languages

Dialog box keyboard shortcuts

  • Ctrl + Tab: Move forward through tabs
  • Ctrl + Shift + Tab: Move back through tabs
  • Tab: Move forward through options
  • Shift + Tab: Move back through options
  • Alt + underlined letter: Perform the command (or select the option) that goes with that letter
  • Enter: Replaces clicking the mouse for many selected commands
  • Spacebar: Select or clear the check box if the active option is a check box
  • Arrow keys: Select a button if the active option is a group of option buttons
  • F1: Display Help
  • F4: Display the items in the active list
  • Backspace: Open a folder one level up if a folder is selected in the Save As or Open dialog box

Windows logo key keyboard shortcuts

  • Windows logo key: Open or close the Start menu.
  • Windows logo key + Pause: Display the System Properties dialog box.
  • Windows logo key + D: Display the desktop.
  • Windows logo key + M: Minimize all windows.
  • Windows logo key + Shift + M: Restore minimized windows to the desktop.
  • Windows logo key + E: Open Computer.
  • Windows logo key + F: Search for a file or folder.
  • Ctrl + Windows logo key + F: Search for computers (if you’re on a network).
  • Windows logo key + L: Lock your computer or switch users.
  • Windows logo key + R: Open the Run dialog box.
  • Windows logo key + T: Cycle through programs on the taskbar.
  • Windows logo key + number: Start the program pinned to the taskbar in the position indicated by the number. If the program is already running, switch to that program.
  • Shift + Windows logo key + number: Start a new instance of the program pinned to the taskbar in the position indicated by the number.
  • Ctrl + Windows logo key + number: Switch to the last active window of the program pinned to the taskbar in the position indicated by the number.
  • Alt + Windows logo key + number: Open the Jump List for the program pinned to the taskbar in the position indicated by the number.
  • Windows logo key + Tab: Cycle through programs on the taskbar by using Aero Flip 3-D.
  • Ctrl+Windows logo key + Tab: Use the arrow keys to cycle through programs on the taskbar by using Aero Flip 3-D.
  • Ctrl+Windows logo key + B: Switch to the program that displayed a message in the notification area.
  • Windows logo key + Spacebar: Preview the desktop.
  • Windows logo key + Up Arrow: Maximize the window.
  • Windows logo key + Left Arrow: Maximize the window to the left side of the screen.
  • Windows logo key + Right Arrow: Maximize the window to the right side of the screen.
  • Windows logo key + Down Arrow: Minimize the window.
  • Windows logo key + Home: Minimize all but the active window.
  • Windows logo key + Shift + Up Arrow: Stretch the window to the top and bottom of the screen.
  • Windows logo key + Shift+ Left Arrow or Right Arrow: Move a window from one monitor to another.
  • Windows logo key + P: Choose a presentation display mode.
  • Windows logo key + G: Cycle through gadgets.
  • Windows logo key + U: Open Ease of Access Center.
  • Windows logo key + X: Open Windows Mobility Center.

Windows Explorer keyboard shortcuts

  • Ctrl + N: Open a new window
  • Ctrl + W: Close the current window
  • Ctrl + Shift + N: Create a new folder
  • End: Display the bottom of the active window
  • Home: Display the top of the active window
  • F11: Maximize or minimize the active window
  • Ctrl + Period (.): Rotate a picture clockwise
  • Ctrl + Comma (,): Rotate a picture counter-clockwise
  • Num Lock + Asterisk (*) on numeric keypad: Display all subfolders under the selected folder
  • Num Lock + Plus Sign (+) on numeric keypad: Display the contents of the selected folder
  • Num Lock + Minus Sign (-) on numeric keypad: Collapse the selected folder
  • Left Arrow: Collapse the current selection (if it’s expanded), or select the parent folder
  • Alt + Enter: Open the Properties dialog box for the selected item
  • Alt + P: Display the preview pane
  • Alt + Left Arrow: View the previous folder
  • Backspace: View the previous folder
  • Right Arrow: Display the current selection (if it’s collapsed), or select the first subfolder
  • Alt + Right Arrow: View the next folder
  • Alt + Up Arrow: View the parent folder
  • Ctrl + Shift + E: Display all folders above the selected folder
  • Ctrl + Mouse scroll wheel: Change the size and appearance of file and folder icons
  • Alt + D: Select the address bar
  • Ctrl + E: Select the search box
  • Ctrl + F: Select the search box

Taskbar keyboard shortcuts

  • Shift + Click on a taskbar button: Open a program or quickly open another instance of a program
  • Ctrl + Shift + Click on a taskbar button: Open a program as an administrator
  • Shift + Right-click on a taskbar button: Show the window menu for the program
  • Shift + Right-click on a grouped taskbar button: Show the window menu for the group
  • Ctrl + Click on a grouped taskbar button: Cycle through the windows of the group

Magnifier keyboard shortcuts

  • Windows logo key + Plus Sign or Minus Sign: Zoom in or out
  • Ctrl + Alt + Spacebar: Preview the desktop in full-screen mode
  • Ctrl + Alt + F: Switch to full-screen mode
  • Ctrl + Alt + L: Switch to lens mode
  • Ctrl + Alt + D: Switch to docked mode
  • Ctrl + Alt + I: Invert colors
  • Ctrl + Alt + arrow keys: Pan in the direction of the arrow keys
  • Ctrl + Alt + R: Resize the lens
  • Windows logo key + Esc: Exit Magnifier

Remote Desktop Connection keyboard shortcuts

  • Alt + Page Up: Move between programs from left to right.
  • Alt + Page Down: Move between programs from right to left.
  • Alt + Insert: Cycle through programs in the order that they were started in.
  • Alt + Home: Display the Start menu.
  • Ctrl + Alt + Break: Switch between a window and full screen.
  • Ctrl + Alt + End: Display the Windows Security dialog box.
  • Alt + Delete: Display the system menu.
  • Ctrl + Alt + Minus Sign (-) on the numeric keypad: Place a copy of the active window, within the client, on the Terminal server clipboard (provides the same functionality as pressing Alt + PrtScn on a local computer).
  • Ctrl + Alt + Plus Sign (+) on the numeric keypad: Place a copy of the entire client window area on the Terminal server clipboard (provides the same functionality as pressing PrtScn on a local computer).
  • Ctrl + Alt + Right Arrow: Tab out of the Remote Desktop controls to a control in the host program (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) program.
  • Ctrl + Alt + Left Arrow: Tab out of the Remote Desktop controls to a control in the host program (for example, a button or a text box). Useful when the Remote Desktop controls are embedded in another (host) program.

Paint keyboard shortcuts

  • Ctrl + N: Create a new picture
  • Ctrl + O: Open an existing picture
  • Ctrl + S: Save changes to a picture
  • F12: Save the picture as a new file
  • Ctrl + P: Print a picture
  • Alt + F4: Close a picture and its Paint window
  • Ctrl + Z: Undo a change
  • Ctrl + Y: Redo a change
  • Ctrl + A: Select the entire picture
  • Ctrl + X: Cut a selection
  • Ctrl + C: Copy a selection to the Clipboard
  • Ctrl + V: Paste a selection from the Clipboard
  • Right Arrow: Move the selection or active shape right by one pixel
  • Left Arrow: Move the selection or active shape left by one pixel
  • Down Arrow: Move the selection or active shape down by one pixel
  • Up Arrow: Move the selection or active shape up by one pixel
  • Esc: Cancel a selection
  • Delete: Delete a selection
  • Ctrl + B: Bold selected text
  • Ctrl + +: Increase the width of a brush, line, or shape outline by one pixel
  • Ctrl + -: Decrease the width of a brush, line, or shape outline by one pixel
  • Ctrl + I: Italicize selected text
  • Ctrl + U: Underline selected text
  • Ctrl + E: Open the Properties dialog box
  • Ctrl + W: Open the Resize and Skew dialog box
  • Ctrl + Page Up: Zoom in
  • Ctrl + Page Down: Zoom out
  • F11: View a picture in full-screen mode
  • Ctrl + R: Show or hide the ruler
  • Ctrl + G: Show or hide gridlines
  • F10 or Alt: Display keytips
  • Shift + F10: Show the current shortcut menu
  • F1: Open Paint Help

WordPad keyboard shortcuts

  • Ctrl + N: Create a new document
  • Ctrl + O: Open an existing document
  • Ctrl + S: Save changes to a document
  • F12: Save the document as a new file
  • Ctrl + P: Print a document
  • Alt + F4: Close WordPad
  • Ctrl + Z: Undo a change
  • Ctrl + Y: Redo a change
  • Ctrl + A: Select the entire document
  • Ctrl + X: Cut a selection
  • Ctrl + C: Copy a selection to the Clipboard
  • Ctrl + V: Paste a selection from the Clipboard
  • Ctrl + B: Make selected text bold
  • Ctrl + I: Italicize selected text
  • Ctrl + U: Underline selected text
  • Ctrl + =: Make selected text subscript
  • Ctrl + Shift + =: Make selected text superscript
  • Ctrl + L: Align text left
  • Ctrl + E Align text center
  • Ctrl + R:: Align text right
  • Ctrl + J: Justify text
  • Ctrl + 1: Set single line spacing
  • Ctrl + 2: Set double line spacing
  • Ctrl + 5: Set line spacing to 1.5
  • Ctrl + Shift + >: Increase the font size
  • Ctrl + Shift + <: Decrease the font size
  • Ctrl + Shift + A: Change characters to all capitals
  • Ctrl + Shift + L: Change the bullet style
  • Ctrl + D: Insert a Microsoft Paint drawing
  • Ctrl + F: Find text in a document
  • F3: Find the next instance of the text in the Find dialog box
  • Ctrl + H: Replace text in a document
  • Ctrl + Left Arrow: Move the cursor one word to the left
  • Ctrl + Right Arrow: Move the cursor one word to the right
  • Ctrl + Up Arrow: Move the cursor to the line above
  • Ctrl + Down Arrow: Move the cursor to the line below
  • Ctrl + Home: Move to the beginning of the document
  • Ctrl + End: Move to the end of the document
  • Ctrl + Page Up: Move up one page
  • Ctrl + Page Down: Move down one page
  • Ctrl + Delete: Delete the next word
  • F10: Display keytips
  • Shift + F10: Show the current shortcut menu
  • F1: Open WordPad Help

Calculator keyboard shortcuts

  • Alt + 1: Switch to Standard mode
  • Alt + 2: Switch to Scientific mode
  • Alt + 3: Switch to Programmer mode
  • Alt + 4: Switch to Statistics mode
  • Ctrl + E: Open date calculations
  • Ctrl + H: Turn calculation history on or off
  • Ctrl + U: Open unit conversion
  • Alt + C: Calculate or solve date calculations and worksheets
  • F1: Open Calculator Help
  • Ctrl + Q: Press the M- button
  • Ctrl + P: Press the M+ button
  • Ctrl + M: Press the MS button
  • Ctrl + R: Press the MR button
  • Ctrl + L: Press the MC button
  • %: Press the % button
  • F9: Press the +/’“ button
  • /: Press the / button
  • *: Press the * button
  • +: Press the + button
  • -: Press the ‘“ button
  • R: Press the 1/x— button
  • @: Press the square root button
  • 0-9: Press the number buttons (0-9)
  • =: Press the = button
  • .: Press the . (decimal point) button
  • Backspace: Press the backspace button
  • Esc: Press the C button
  • Del: Press the CE button
  • Ctrl + Shift + D: Clear the calculation history
  • F2: Edit the calculation history
  • Up Arrow key: Navigate up in the calculation history
  • Down Arrow key: Navigate down in the calculation history
  • Esc: Cancel editing the calculation history
  • Enter: Recalculate the calculation history after editing
  • F3: Select Degrees in Scientific mode
  • F4: Select Radians in Scientific mode
  • F5: Select Grads in Scientific mode
  • I: Press the Inv button in Scientific mode
  • D: Press the Mod button in Scientific mode
  • Ctrl + S: Press the sinh button in Scientific mode
  • Ctrl + O: Press the cosh button in Scientific mode
  • Ctrl + T: Press the tanh button in Scientific mode
  • (: Press the ( button in Scientific mode
  • ): Press the ) button in Scientific mode
  • N: Press the ln button in Scientific mode
  • ;: Press the Int button in Scientific mode
  • S: Press the sin button in Scientific mode
  • O: Press the cos button in Scientific mode
  • T: Press the tan button in Scientific mode
  • M: Press the dms button in Scientific mode
  • P: Press the pi button in Scientific mode
  • V: Press the F-E button in Scientific mode
  • X: Press the Exp button in Scientific mode
  • Q: Press the x^2 button in Scientific mode
  • Y: Press the x^y button in Scientific mode
  • #: Press the x^3 button in Scientific mode
  • L: Press the log button in Scientific mode
  • !: Press the n! button in Scientific mode
  • Ctrl + Y: Press the y√x button in Scientific mode
  • Ctrl + B: Press the 3√x button in Scientific mode
  • Ctrl + G: Press the 10x button in Scientific mode
  • F5: Select Hex in Programmer mode
  • F6: Select Dec in Programmer mode
  • F7: Select Oct in Programmer mode
  • F8: Select Bin in Programmer mode
  • F12: Select Qword in Programmer mode
  • F2: Select Dword in Programmer mode
  • F3: Select Word in Programmer mode
  • F4: Select Byte in Programmer mode
  • K: Press the RoR button in Programmer mode
  • J: Press the RoL button in Programmer mode
  • <: Press the Lsh button in Programmer mode
  • >: Press the Rsh button in Programmer mode
  • %: Press the Mod button in Programmer mode
  • (: Press the ( button in Programmer mode
  • ): Press the ) button in Programmer mode
  • |: Press the Or button in Programmer mode
  • ^: Press the Xor button in Programmer mode
  • ~: Press the Not button in Programmer mode
  • &: Press the And button in Programmer mode
  • A-F: Press the A-F buttons in Programmer mode
  • Spacebar: Toggles the bit value in Programmer mode
  • A: Press the Average button in Statistics mode
  • Ctrl + A: Press the Average Sq button in Statistics mode
  • S: Press the Sum button in Statistics mode
  • Ctrl + S: Press the Sum Sq button in Statistics mode
  • T: Press the S.D. button in Statistics mode
  • Ctrl + T: Press the Inv S.D. button in Statistics mode
  • D: Press the CAD button in Statistics mode

Windows Journal keyboard shortcuts

  • Ctrl + N: Start a new note
  • Ctrl + O: Open a recently used note
  • Ctrl + S: Save changes to a note
  • Ctrl + Shift + V: Move a note to a specific folder
  • Ctrl + P: Print a note
  • Alt + F4: Close a note and its Journal window
  • Ctrl + Z: Undo a change
  • Ctrl + Y: Redo a change
  • Ctrl + A: Select all items on a page
  • Ctrl + X: Cut a selection
  • Ctrl + C: Copy a selection to the Clipboard
  • Ctrl + V: Paste a selection from the Clipboard
  • Esc: Cancel a selection
  • Delete: Delete a selection
  • Ctrl + F: Start a basic find
  • Ctrl + G: Go to a page
  • F5: Refresh find results
  • F5: Refresh the note list
  • F6: Toggle between a note list and a note
  • Ctrl + Shift + C: Display a shortcut menu for column headings in a note list
  • F11: View a note in full-screen mode
  • F1: Open Journal Help

Windows Help viewer keyboard shortcuts

  • Alt + C: Display the Table of Contents
  • Alt + N: Display the Connection Settings menu
  • F10: Display the Options menu
  • Alt + Left Arrow: Move back to the previously viewed topic
  • Alt + Right Arrow: Move forward to the next (previously viewed) topic
  • Alt + A: Display the customer support page
  • Alt + Home: Display the Help and Support home page
  • Home: Move to the beginning of a topic
  • End: Move to the end of a topic
  • Ctrl + F: Search the current topic
  • Ctrl + P: Print a topic
  • F3: Move the cursor to the search box

Creating a new Forest and Domain on Server Core

Over the weekend, good friend, Mitch Garvis decided it was necessary to rebuild his home network.  Now, most home networks don’t have a $25,000 Server at the core.  This one did.  Given that, we decided to do it right.    The network architecture called for Virtualization, so we decided to use Hyper-V.  The network called for management, so we decided to install SCCM and Ops Manager.  The network called for simplicity so we used Active Directory.

However, we decided to up the ante and install this all on Server Core.  Now, the tricky part is that we needed to install Active Directory.  The reason this became tricky was because there is no documented procedure out there on how to install a new Forest on Core.  There are lots of very smart people on the internet that described how to install new domains part of existing forests, but not new forests.  So we got to work.

After running dcpromo a few times we realized we couldn’t create the Forest by throwing commands at it.  It occurred to one of us that we should try creating an unattend.txt install file.  After a few tries, we figured out the proper structure of the file, and after 10 minutes of watching the CLI spit out random sentences, we had a new domain. 

The structure of the file is fairly simple, but you need the correct variable data.  We used the following unattend.txt file to create the new domain:

[DCInstall]
InstallDNS=yes
NewDomain=forest
NewDomainDNSName=swmi.ca
DomainNetBiosName=SWMI
SiteName=Default-First-Site-Name
ReplicaOrNewDomain=domain
ForestLevel=3
DomainLevel=3
DatabasePath="%systemroot%\ntds"
LogPath="%systemroot%\ntds"
RebootOnCompletion=yes
SYSVOLPath="%systemroot%\sysvol"
SafeModeAdminPassword=Pa$$w0rd

Now: Once the file was created we put it in the root of C: on the server core machine, and typed the following command:

dcpromo /unattend:c:\unattend.txt

Surprisingly it worked.  After checking with Microsoft, this is a supported option, and it’s not a hack in any way.  It’s just undocumented.

Until now.

Reference: Mitch Garvis, SWMI, http://garvis.ca/blogs/mitch/archive/2009/10/12/creating-a-new-domain-forest-on-server-core.aspx

Pictures from Techdays and FailCamp in Toronto

After getting my camera back from Mitch Garvis after Techdays and FailCamp in Toronto, I decided to upload photos from the events, and to my surprise there were some pretty good shots.  Here is what I came back with:

4007417044

4006643533

4007406358

4006631995

4007393754

4006623627

4006616273

4007373722

4006582013

4006587385

4007358462

4006597103

4007340130

Stop Complaining About Software Expenses

It’s been a long week, and it’s only Monday.  It all started with an off-the-cuff comment.  It was of the petty nature, and it certainly wasn’t accurate.  It seems that is usually the case with petty comments.

I was berated for suggesting SharePoint Services as a replacement for our ageing intranet, and the commenter responded with a quick “SharePoint?  Microsoft makes that, it’ll cost too much.  Our current java site works just fine, and it’s free.”  Or something of that nature. 

How do you respond to a petty comment?  It’s pretty damn hard:

  1. While Microsoft Office SharePoint Server 2007 does cost money for licensing, Windows SharePoint Services 3.0 (which MOSS is built on) is free.  Not free as in speech, but free as in beer.  Always has been. 
  2. Java is a terrible language for websites.  It’s slow, and none of the developers in the company know Java.  We all program with .NET languages.
  3. The current intranet is running on an AS/400.
  4. The bulk of the stuff we do on our current intranet could very easily be done in SharePoint, without any development.  And, we can also increase productivity with the added features of team workspaces and free templates for other departments.
  5. The only cost will be in man-hours setting the server up, and migrating content.

Those have been my main arguments since I started working here.  We are a Microsoft shop, but very often choose non-Microsoft products.  Hmm…

The main reason we don’t use Microsoft products is cost.  Plain and simple.  Ironically, that is also the same reason WHY we use Microsoft products.

We use SQL Server, Windows Server 2008, Active Directory (finally!), IIS, MOSS (soon), and program in C#.  We don’t use office 2007, only Office 2003, some computers are still on Windows 2000 and XP.  Only one computer is running Vista, and two are running Windows 7.  But then again, we are a Not-For-Profit company.  Budgets are tight.

This post is NOT a comment on our current state of technology, because like I said in a previous post, we do a pretty good job of staying on the cutting edge in a few cases.

This post IS a comment on the people out there who think cost is the only thing to look at when evaluating a product.  For the love of god, STOP bitching about price.  START bitching about quality.

I can’t stand bad software.  People don’t pay for good software, but then complain about its quality.  Come on!  There is a formula out there that calculates the cost of a piece of software over time.  It takes into account initial cost, and the cost of the updates that follow.  It’s a simple y = mx+b formula.

Now, when you have a higher initial cost, you tend to assume it’s of higher quality.  Put this into the equation, and the number of updates, and the cost to implement these updates goes down.  Over the life of the product, it’s cheaper to go with the software that is initially more expensive.  This is basic business.

What this basic business formula doesn’t show you is the added headaches you get with crappy software.  You tend to end up with silos of systems, and silos of data.  You don’t get integration.  This is where the cost sky rockets.  Or more accurately, this is where productivity decreases.

Ironically…

SharePoint Services 3.0 is free.  It doesn’t cost anything to use.  It’s easy to use, and integrates with most of our internal systems.  I just ruined my entire argument.  Sorta.  SharePoint is a quality piece of software, and over time, it will cost less to use and maintain than any of the other intranet/middleware applications out there.  Most people don’t realize this.

I’ll probably get flack for this one:  Most people don’t complain about software expenses.  They complain about Microsoft expenses.

  • “We give Microsoft too much money, and don’t get enough in return.”
  • “There must be better software vendors out there than Microsoft that are cheaper.”
  • “Why bother upgrading; XP Works fine.”

Have you seen the cost of a friggen Oracle license?  What about IBM’s iSeries?  Novell’s Groupwise?  My jaw dropped when I saw the cost of these things.  I can’t say a single nice thing about Groupwise.  It’s a terrible product.  IBM’s iSeries is pretty good, but it’s limited what you can do with it.  Oracle knows databases, but has a higher license cost than a good chunk of a department’s salary.

Microsoft gets most of our money because it has quality products, at a good price.  Look at a few competing vendors products and compare cost and quality as well as the ability to integrate across platforms.  Revelation is a wonderful thing.  You might think twice before settling on cost.

Reminder! Windows 7 Beta Expiration

Reposted without* permission from the Canadian IT Pro blog.

Windows 7 UltimateI just wanted to post a reminder that the Windows 7 Beta is set to expire on July 1st, 2009.  What does that mean?  Well it isn’t going to explode, eat your data or lock you out.  What is going to happen is that the PC will force you to reboot every two hours.  But have no fear there is a way to fix this, simply install the Windows 7 Release Candidate which you can still download.

While an upgrade isn’t supported, and I strongly recommend a clean install, you can find a workaround that will allow you to do an in place upgrade.

Grab the Release Candidate here!

 

* I never asked.  I doubt they will care.  Correct me if I am wrong, Rodney! 

Techdays 2009 &amp;ndash; VIP Pricing

As budgets get tighter, Tech·Days is the perfect way to get the Tech·Ed experience without the travel expense, with two days of skill-strengthening education to help you position yourself for success by:

  • Learning the technology—with a customizable agenda from over forty sessions across five technical tracks on both current technologies and new products, like Windows® 7 and Microsoft® Exchange 2010;
  • Connecting with Experts and Peers—with Birds-of-a-Feather lunches and the new Windows 7 Zone, you'll have lots of opportunities to share your ideas with those who know the products best; and
  • Apply what you learn—with a Learning Kit packed with products and resources so you can continue to grow your skills long after the event has finished.

Technologies discussed: Windows 7 Operating System, Windows Server® 2008 R2 operating system, Visual Studio® 2008 development system, Silverlight™ browser plug-in, Exchange 2010, Security/Management, and more.

If you want the VIP Discount use the promo code TD09Partner.

City Date Venue
VANCOUVER
TD09Partner
SEPTEMBER 14-15 Vancouver Convention Centre
TORONTO
TD09Partner
SEPTEMBER 29-30 Metro Toronto Convention Centre
HALIFAX
TD09Partner
NOVEMBER 2-3 World Trade & Convention Centre
CALGARY
TD09Partner
NOVEMBER 17-18 Calgary Stampede
MONTREAL
TD09Partner
DECEMBER 2-3 Mont-Royal Centre
OTTAWA
TD09Partner
DECEMBER 9-10 Hampton Inn & Convention Centre
WINNIPEG
TD09Partner
DECEMBER 15-16 Winnipeg Convention Centre

Early Bird: $299, Regular Price: $599

There is a good chance I will be presenting at one (or more) of these locations, so keep an eye out.  In the event that I don’t, I will definitely be enjoying the Toronto stop of the tour.  In either case, I will be there ready to learn, with a pocket-full of business cards.

Oh, and I’ll be leaving with a box/bag/shopping cart* of swag.

*Metaphorical shopping cart.  They are going to give away lots of awesome stuff.

Single Sign-On

Is it just me, or is Microsoft the only vendor out there that gives you SSO in all their products, free?  Novell requires you buy their add-on product.  Oracle has nothing relevant.  Never gonna happen on any Linux distro out of the box.  Too many variables.

The integration alone is reason enough to use Microsoft products.  Is it just me, or do people choose to go anti-Microsoft out of spite?

Just a thought.

How to Fix “The file exists. (Exception from HRESULT: 0x80070050)…” error on SharePoint

If you're getting the error "The file exists. (Exception from HRESULT: 0x80070050)", when you attempt to access your SharePoint site, or even SharePoint Central Administration site, the chances are that some (or all) SIDs on your server were changed. This has probably happened because you have removed and recreated some user accounts that you use to run SharePoint services, or you have run sysprep on your server, or you have recently turned your SharePoint server into Active Directory domain controller. It's not a good idea to do any of those things with your SharePoint server, but I'm not here to judge – I'm here to help J

Please note, that the steps described below is a "low-tech" solution to the problem, which requires you to actually understand what you're about to do. USE AT YOUR OWN RISK!!! And, of course, do not forget about backups, backups, backups. Also, I would like to point out the credit for this solution goes to the blog and his/her author that is no longer online.

Anyway, to solve "The file exists. (Exception from HRESULT: 0x80070050)…" error:

  1. Login to your SharePoint and open SQL Server Management Studio. Create New Query
  2. To get the list of Site IDs you need to use SharePoint_AdminContent_* database for Central Administration Site and run the following query:
    SELECT s.Id, w.FullUrl FROM Sites s inner join Webs w on s.RootWebId = w.Id
  3. As a result of the query above, you will see all Site IDs for the selected database. Now, using that data, run a new query:
    SELECT * FROM UserInfo WHERE tp_Login='Hostname/Username' and tp_SiteID='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
    where tp_Login is the hostname and username using which you're trying to login to SharePoint; and tp_SiteID is the site ID from the previous query
  4. As a result of the query above, you will see the SID for the selected user. Now, here comes the tricky part, you need to get SID number for the user account that you're logging in with (in my case, it was Administrator account) and convert it to hexadecimal format:
    1. To get SID for a user account, you can use PSTOOLS utility. Run PSGETSID \\HOSTNAME USERNAME to get SID info
    2. To convert the SID to hexadecimal format, use the following VB script and run it against the SID obtained in the previous step: sid2gex.vbs mySID, where my mySID is the SID for the user account you're working with. As a result, you will receive SID in the hexadecimal format.
  5. Now we will update our database table with newly obtained SID using:
    UPDATE UserInfo SET tp_SystemID = 0x010500000000000000000986BD9EA976E44036C3F5D3F04040000
    FROM UserInfo
    WHERE tp_ID = '1' and tp_guid='XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX' and
    tp_Login='hostname\username' and tp_SiteID = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
    where tp_ID, tp_guid, tp_Login and tp_SiteID are the attributes of the user account for which we want to update tp_SystemID. Note: you might have to repeat those steps for the services accounts which are running your search, shared services provider, etc.

After implementing the steps above, you might have to update service accounts in the SharePoint configuration. Microsoft has an excellent guide on how to make those changes.