18 Jan 2011

Managing Windows 2008 Server Core Local Settings

A Server Core installation provides a minimal environment for running specific server roles, which reduces the maintenance and management requirements and the attack surface for those server roles. A server running a Server Core installation supports the following server roles:

  • Active Directory Domain Services (AD DS)
  • Active Directory Lightweight Directory Services (AD LDS)
  • DHCP Server
  • DNS Server
  • File Services
  • Print Services
  • Streaming Media Services
  • Internet Information Services (IIS)
  • Windows Virtualization

In Windows Server 2008, Server Core installation does not include the traditional full graphical user interface (GUI). Therefore, once you have configured the server, you can only manage it locally at a command prompt, or remotely using a Terminal Server connection. A third management option is to manage the server remotely using the Microsoft Management Console (MMC) or command-line tools that support remote use.

A Server Core installation provides these benefits in three ways:

  • By reducing the software maintenance required (less updates, etc...)
  • By reducing the management required
  • By reducing the attack surface

To accomplish this, the Server Core installation option installs only the subset of the binary files that are required by the supported server roles. It takes about 1 GB of disk space and +/- 100 MB memory footprint (varies per server core role).

The following list is a compilation of some of the most useful commands allowing you to either locally or remotely manage a Server Core installation. You can use this as a quick reference guide, but as always, reading the full server help for a full guide.

Please make sure you also read the other articles listed in the "Related Articles" section below, for a more thorough list of Server Core tips and tricks.

To manage a server running a Server Core installation locally at a command prompt

  1. Start a server running a Server Core installation.  
  2. Log on using an administrator account.  
  3. At the command prompt, use the appropriate command-line tool for the task you want to complete.  

To add hardware to Windows Server 2008

  1. If the driver for the hardware is included in Windows Server 2008, Plug and Play will start automatically and install the driver.  
  2. At a command prompt, open the folder where the driver files are located, and then run the following command:
    pnputil -i -a 

    Where: driverinf is the file name of the .inf file for the driver.  

  3. If prompted, restart the computer.

To add a user to the local Administrators group

  1. At a command prompt, type:
    net localgroup Administrators /add '

     

To remove a user from the local Administrators group

  1. At a command prompt, type:
    net localgroup Administrators /delete 

     

To disable a device driver

  1. At a command prompt, type:
    sc delete 

    Where: service_name is the name of the service that you obtain by running

To obtain a list of drivers that are installed on the server

  1. At a command prompt, type:
    sc query type= driver

    Note: You must include the space after the equal sign for the command to complete successfully.

To manage event logs

  1. To list event logs type:
    wevtutil el

     

  2. To query events in a specified log type:
    wevtutil qe /f:text 

     

  3. To export an event log type:
    wevtutil epl 

     

  4. To clear an event log type:
    wevtutil cl 

To list the running services

  1. At a command prompt, type one of the following:
    sc query

    or

    net start
  1. At a command prompt, type one of the following:
    sc start 

    or

    net start 

     

To stop a service

  1. At a command prompt, type one of the following:
    sc stop 

    or

    net stop 

To forcibly stop a process

  1. Use the tasklist command to retrieve the process ID (PID).  
  2. At a command prompt, type:
    taskkill /PID 

     

To configure the firewall

  1. Use the netsh advfirewall command. For example, to enable remote management from any MMC snap-in, type the following:
    netsh advfirewall firewall set rule group="Remote Administration" new enable=yes

    Note: You can also use the Windows Firewall snap-in from a Windows Vista or Windows Server 2008 computer to remotely manage the firewall on a server running a Server Core installation. To do this, you must first enable remote management of the firewall by running the following command on the computer running a Server Core installation:

    netsh advfirewall set currentprofile settings remotemanagement enable

Configure the paging file

  1. At a command prompt type:
    wmic pagefileset where name="" set InitialSize=,MaximumSize=

    Where:

    • path/filename - is the path to and name of the paging file
    • initialsize - is the starting size of the paging file in bytes.
    • maxsize - is the maximum size of the page file in bytes.

To install an optional feature

  1. At a command prompt, type:
    start /w ocsetup 

    Note: Using /w prevents the command prompt from returning until the installation completes. Without /w, there is no indication that the installation completed. Where featurename is the name of a feature from the following list:

    • Failover Clustering: FailoverCluster-Core
    • Network Load Balancing: NetworkLoadBalancingHeadlessServer
    • Subsystem for UNIX-based applications: SUACore
    • Multipath IO: MultipathIo
    • Removable Storage: Microsoft-Windows-RemovableStorageManagementCore
    • Bitlocker Drive Encryption: BitLocker

    Note: To install the remote administration tool for BitLocker, type the following at a command prompt:

    start /w ocsetup BitLocker-RemoteAdminTool

     

    • Backup: WindowsServerBackup
    • Simple Network Management Protocol (SNMP): SNMP-SC
    • Windows Internet Name Service (WINS): WINS-SC
    • Telnet client: TelnetClient

    Note: To remove an optional feature, use start /w ocsetup with the appropriate role name and the /uninstall switch.

To reboot the server

  1. You can reboot the server by typing the following at a command prompt:
    shutdown /r /t 0

To change the name of the server

  1. Determine the current name of the server with the hostname or ipconfig /all commands.  
  2. At a command prompt, type:
    netdom renamecomputer  /NewName:

    Note: You can obtain the name of the server by running the hostname or ipconfig /all commands.  

  3. Restart the computer.

To change the name of a domain-joined server

  1. At a command prompt, type:
    netdom renamecomputer %computername% /NewName: /userd: /password:*

     

To set the administrative password

  1. At a command prompt, type the following:
    net user administrator *

     

  2. When prompted to enter the password, type the new password for the administrator user account and press ENTER.  
  3. When prompted, retype the password and press ENTER.

Summary

In Windows Server 2008, Server Core installations are used to offer a slim, well-tuned and secure method of running specific roles. These servers need to be properly configured. This article, and the other articles in this series, will show you how to do that.


13 Jan 2011

10 Tools Every Network Administrator Should Have On Their Thumbdrive

Working as a systems administrator oftentimes requires you to interact with many different computers in a single day. One minute you're dealing with cranky users complaining about slow performance on their PCs and the next minute your soothing badly behaving domain controllers.

Having to interact with so many different PCs makes it all the more advantageous to keep a core set of tools with you at all times. Many useful tools can be run from a portable storage device and some have even been specifically designed to run on portable storage devices. The former are what I call "portable compatible" and the latter can be considered "stealthy". That is, some apps can work on a portable device but are likely to add edits to the local registry while "stealthy" apps make no changes to the registry and ostensibly leave no traces behind. With that said, here are 10 things that I believe every Windows Administrator should have on their USB thumbdrives:

1. The Sysinternals Suite

As of June 2009 there are 66 tools in the suite. A thorough understanding of each of them is improbable (unless your name is Cogswell or Russinovich), however some of them have more readily understandable uses than others. For instance, Process Explorer allows you to see deeply into each running process, its CPU history, which executable was used to launch the program, where it is and what switches were used when launching. PsExec allows you to run any process on a remote system. Ever wanted to run another computer's command prompt from your machine? PsExec is the tool to do it with! Conversely, PsKill can kill remote processes without having to install a utility on the remote computer.

As a bonus, each of the Sysinternals tools are available "live" at "live.sysinternals.com\tools" which is essentially just a file share open to the internet. You can access any of their tools from a command prompt or the run box by using a standard UNC path like this: \\live.sysinternals.com\tools\[toolname]. Furthermore, since it's a file share, you can map a drive to that UNC path and give it a drive letter (thanks go to Ed Bott for cluing me in to that one). Even if you lose your thumbdrive you can still have easy access to the latest and greatest sysinternals tools on any computer with a network connection!

2. Windows Support and Resource Kit Tools

There's a bit of confusion about this topic. Before Vista and Server 2008, the resource kit tools were bundled with their respective resource kit book series (E.g. the Windows XP Resource kit) but they could also be downloaded from Microsoft's web site. The support kit tools were included with the OS installation media and could also be downloaded from Microsoft's web site. Nowadays, while both Vista and Server 2008 have resource kit tools, it seems that at the time of this writing they can only be acquired through purchasing the Vista or Server 2008 Resource Kit book set.

Furthering the departure from normalcy, it appears that the term "Support Tools" has been abandoned in favor of the term "Remote Server Administration Tools" (RSAT). Instead of downloading the toolset separately they are now "built in" to Server 2008, but you have to add them first through the Add Features Wizard. If you want to copy them to your USB drive, the only way that I know to retrieve them is to install the category of RSAT tool that you want and then search through WINDOWS\System32 for the desired tools. It seems that there is no single collection of updated "Support Tools" (or RSATs as they're now known) that you can download. If it sounds cumbersome to move the tools to a thumbdrive it's because it is. If anyone else has a better way, please comment! If you choose to use the Server 2003 / XP support tools you'll need to unpack the support.cab file from the support\tools folder on the installation media. My preference is to simply open it with Windows Explorer and drag 'n' drop the entire cabinet file's contents into a folder on my USB stick. There are several .dll, .vbs, .chm and other files included. The tools weren't designed with portability in mind but they should work (I say "should" since I haven't ever had to use each and every tool from a portable device nor do I know anyone who has).

3. All Purpose Network Scanner

Nary does a day go by that your average admin doesn't have to scan a network, IP range or port scan a node. Having a good network scanner handy can greatly expedite the network troubleshooting process. I prefer to use SoftPerfect's Network Scanner which does not need an installer and can run without administrator credentials.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-1

Other key features include the ability to list file shares (including hidden shares), send WoL packets, remote shutdown PCs, detect your external IP address, scan for logged on users and more. However, If you want something much more powerful that can do more security oriented audits, you could use the portable version of nmap 3.8.

4. Portable Web Browser

Having your own browser with its own preferences and bookmarks is nice but having it available to you on any PC is even nicer. There are portable versions of several of the popular "non-portable" web browsers such as FireFox Portable and Opera-USB. Those two browsers specifically state that they do not leave any personal data behind on the local system's hard drive. There are also some more obscure offerings such as portable versions of Avant, Maxthon and Sleipnir. For even more security, you could try the xB Browser from XeroBank. The xB browser is designed to work with either the Tor network or the arguably more secure XeroBank anonymity network.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-2
"What about IE!" some may be howling. While there's no official portable version of Internet Explorer, there is a possible alternative. Using FireFox portable, you can install IE Tab and switch to the explorer rendering engine as needed. Using this method I was able to update an XP Pro machine using the Windows Update website (which rejects all browsers except Internet Explorer) using Firefox portable. However, I was unable to empirically test if IE tabs edits the registry (I suspect that it does). Whether traveling between a home and work computer, staying secure on a public machine or helping out Grandma with her new gaming rig you'll be happy to have a trusted web browser that's always there for you.

5. TrendMicro HijackThis

What Windows admin hasn't had to deal with some kind of suspected malware infection regardless of whether or not an anti virus product was in place? Servers or clients, it makes no difference. Having some kind of anti malware detection program with you at all times is a must. Originally coded by Merijn Bellekom and later sold to Trend Micro, HijackThis has become one of the foremost tools used in the fight against malware. While not a "stealthy" portable app (it leaves registry edits behind) the .exe is completely self contained and can run perfectly fine on a portable drive. Best of all it's completely free and there is no EULA prohibiting it from being used in a business environment like there is for other free anti-malware products (Adaware Personal and MalwareBytes Anti-Malware, for example).  The program's primary usage is to scan key locations in the Windows registry and various places on your hard drive and then make a log file of the entries and files that it finds. The things that HijackThis finds may not be bad in and of themselves (in fact, most are innocuous). The real power of HijackThis comes from the community of volunteer logfile analyzers and the automated www.HijackThis.de web site.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-3

HijackThis also includes some lesser known features such as a startup list generator, process manager (similar to task manager), the ability to delete a file on reboot, the ability to delete an NT service, scanning for hidden data streams and an Add/Remove programs editor (handy to delete entries for the occasional application that uninstalled but didn't remove its entry in the Add/Remove Programs list). Because of the power of HijackThis and the potential for disaster if you delete the wrong files, please read some tutorials before you jump into it.

6. OpenOffice Portable

Wherever you go and whichever computer you're using at the moment, the ability to create and edit a diverse array of document types is crucial. You never know when you'll need to hand craft a quick XML file, quickly modify your boardroom presentation or create a spreadsheet that aids in the creation of scripts (similar to Coach Culbertson's mass user creation script facilitated by an Excel spreadsheet in the Train Signal Windows Server 2008 Active Directory training videos). OpenOffice is the premier Open Source Office Suite for Windows, Linux and OS X and, thanks to the folks at PortableApps.com, it now comes in a portable format. It includes Writer (text document creator), Calc (spreadsheets), Impress (slide presentation creator; think PowerPoint), Draw (self explanatory), Math (mathematical formula creator) and Base (database creation tool; think Microsoft Access). Open Office can open many document formats including Office 2007 .docx and .xlsx files. It can also save files in Office 2000 format (no further up the Office version chain, though) as well as a host of open formats.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-4

7. Terminal Emulator

Many devices (especially networking equipment) have an RS-232 (Serial), SSH or Telnet interface (horrors!) that you need to connect to in order to do some deep hacking. One of the more popular terminal emulators is PuTTY and now it comes in a portable version: portaPuTTY. PortaPuTTY has been conveniently modified to store configuration and session data in flat files rather than the registry.  There's also the similarly named PuTTY Portable which is a PortableApps.com application.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-5

The main PuTTY application has been forked to produce KiTTY, which itself is not portable. However, (you guessed it) it has been further forked to produce its own portable version: Portable KiTTY. KiTTY includes some more features than PuTTY so check the feature list to see if they would actually be useful to you. Another free option is TunnelierPortable or TunnelierU3 (designed to work with U3 devices) which are based on Tunnelier from bitvise (which officially approves of these "fan projects"). However, make sure to read the Tunnelier license agreement to understand under what circumstance you are obliged to purchase a license.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-6

8. Password Manager

Keeping track of passwords is hard and as a result people tend to write passwords down on slips of paper and "hide" them in a secure place (for the record, placing sticky notes under your desk phone is not a secure place). As a result, many people reuse the same password or small pool of passwords for many different accounts so they won't forget them. Password managers can aid in the implementation of better security by allowing you to have complex passwords for each account without having a memory like Kim Peek. KeePass is an open source tool released under the GPLv2 license and is one of the more popular password safes. Fortunately, it also comes in a portable edition. KeePass database files are encrypted with twofish or AES 256 encryption algorithms so if you lose the USB drive, it would be exceptionally difficult for someone to crack the file. Version 2.0 of KeePass supports keeping the password file on an HTTP/FTP server which could conceivably increase the portable uses for the application. Another portable password manager is the closed source RoboForm 2 Go.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-7

It is offered in a U3 and a non U3 format. They even offer their own custom RoboForm USB key. RoboForm can fill in long registration forms with one click, it can synchronize your passwords between computers and it claims to be able to defeat keyloggers. There are two editions of RoboForm 2 Go; a free version and a Pro version. The free version cannot be used in a business environment for more than 30 days. Since RoboForm caters to fillin gout long web forms it is designed to closely integrate with your web browser in the form of a toolbar. It runs in the background from the portable storage device with a SysTray icon being the only visible indicator of it's existence outside of the browser. For even more portability, you can use the RoboForm Online service that stores your passwords in their cloud. There are many more password managers out there for you to evaluate, but those are two of the more popular titles. Now you can have unique massive passwords on your switches, domain controllers and other important devices and not worry about being locked out because you can't remember passwords that are more complex than the name of Star Trek characters.

9. Remote Desktop / VNC client

The ability to remotely control a distant PC is undeniably valuable. But what if you find yourself on an unfamiliar computer? Wouldn't it be nice to have pre made RDP connections with you wherever you go? Or have a familiar VNC client with you at alltimes? It would be nice, however, there is a surprising dearth of portable RDP and VNC clients available. TRAVEL@Clip (yes, it's supposed to be typed that way) is one of those few.

10-Things-every-Windows-Administrator-Should-Have-on Their-Thumbdrive-8

TRAVEL@Clip is a $25USD program that allows you to establish RDP connections (no VNC support) without the need for administrator rights. It keeps all settings in an encrypted file on the USB drive and does not make any changes to the host PC. It can save up to 9 separate connections. I was surprised that I was unable to find any stable freeware/opensource portable RDP tools, so it looks like you'll have to spend a little cash for RDP mobility. There is one possibility worth noting: ChrisControl. Intended for use on a Windows PE disc, it is said to not write settings to the registry. It purportedly allows you to connect to remote PCs via RDP or VNC. It was even supposed to be able to install an UltraVNC server on the remote computer if it wasn't already installed and uninstall it when you disconnect. That feature sounded exciting and even reminded me of Dameware Mini Remote Control's remote installation and uninstallation features… except for one important point: Dameware works. I tried two versions of ChrisControl and was never able to get it to work. Others on the web have stated that it worked fine for them. I only mention it here because you might have better success with it or future versions (if there are any) might make it work smoother. As for VNC tools that are specifically designed for portability, well, if there are any they're well hidden. It seems that most of the major VNC viewer applications are "portable compatibe" meaning that they will work from a portable storage device but none of them are advertised to not touch the local machine's registry. That may or may not be acceptable in your environment. The various major VNC viewer applications are Tight VNC Viewer (look for the package with the description "Viewer executable, does not require installation"), Real VNC viewer and UltraVNC Viewer.

10. Network Protocol Analyzer

Wireshark, seemingly everyone's favorite protocol analyzer (Although Microsoft's Network Monitor is pretty cool too), now comes in portable format. Well… pseudo-portable. For Wireshark to work it needs the Winpcap package to be installed. Every time you launch Wireshark portable it checks to see if the Winpcap driver is installed and if it isn't it asks to install Winpcap (of course, you'll need proper permissions on the computer to do that). When you exit Wireshark portable, it courteously uninstalls Winpcap in an attempt at leaving the computer as untouched as it possibly can. If you can live with those caveats, then you can wade knee deep in raw streams of network traffic on any computer you touch. If you can't live with that, you'll have to use a tool that utilizes a method called "Raw Sockets" which has some limitations but should be fine for most situations. IP Sniffer is a decent utility that utilizes raw sockets. Another raw sockets option is NirSoft's SmartSniff.

I'm sure that if you include those 10 things on your thumbdrive you'll be solving problems quicker, saving the day more often and hopefully getting home earlier. Since thumbdrives can be easily lost, consider creating a script using Task Scheduler and RoboCopy (built-in to Vista and Server 2008, included in the Server 2003 Resource Kit tools) to periodically create a backup. For even more portable applications you might want to look into the PortableApps project which has a huge collection of applications that are said to leave no traces of themselves whatsoever on the host computer. Who wouldn't want to be able to play Sudoku from their thumbdrive?

Delete IE7 History From the Command Line

When cloning a computer running Windows XP, 2003, Vista or 2008, one of the tasks that you should perform before running SYSPREP is to delete the Internet Explorer 6 history, stored passwords, offline files and cookies. Same goes when preparing a computer for transfer to another user, or simply requiring that previous user data be deleted.

Through the usual IE GUI

One method of performing this task is by using the IE7 GUI.

Open Internet Explorer, and from the Tools menu, open Internet Options.

Go to the General tab, and in the Browser History section, click on the Delete button.

In the Delete Browser History window, click one of the following buttons, based upon your requirements:

Temporary Internet Files > Delete files – To delete copies of web pages, images, and media that  are saved for faster viewing.

Cookies > Delete cookies – To delete cookies, which are files stored on your computer by websites to save preferences such as login information.

History > Delete history – To delete the history of the websites you have visited.

Form data > Delete forms – To delete all the saved information that you have typed into forms.

Passwords > Delete passwords – To delete all the passwords that are automatically filled in when you log on to a website you've previously visited.

Delete all – To delete all of the above in one operation.


By using a command

However, sometimes it is much easier to simply run a command line command or batch file to perform the same tasks. I use such a batch file and place it in one of my "special scripts" folder, where I store all my cool stuff. All I have to do is simply double-click on it, and bingo, history, passwords, cookies and offline files are deleted.

Here are the independent commands you can use. Go to Start > Run. Type CMD and press Enter. In the Command Prompt window, type (or copy and paste) the following commands, and press Enter:

Delete Temporary Internet Files

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

Delete Cookies

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

Delete History

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

Delete Form Data

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

Delete Stored Passwords

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

Delete All

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

Delete All with the "Also delete files and settings stored by add-ons" options selected

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

Now it seems that the interesting bit is that you can combine the numbers to get 2 or more functions at the same time. For example, type:

RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 9

This will delete the files (+8) and history (+1) in one step. You can incorporate this into a logoff script, and assign it to users by using Group Policy (GPO).

Creating a shortcut

You can create a shortcut and place it on your desktop or Quick Launch toolbar.

Right-click on an empty spot on your desktop, select New > Shortcut.

In the Create Shortcut window, paste one of the above commands.

Give it an appropriate name, and press Finish.

You can also change the shortcut icon by right-clicking on it and selecting Properties. Next press the Change Icon button.

You can use the following file to find some interesting icons for the shortcut:

%SystemRoot%'System32'shell32.dll

Creating a batch file

You can also create a batch file that you can simply run by double-clicking on it. Save the following text as a .BAT file:

@ECHO OFF
ECHO Deleting current user's Temporary Files, Cookies, History, Form Data and Stored Passwords
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255
ECHO Done!
PAUSE
CLS

Second example uses e different approach, but it's also worth noting:

@ECHO OFF
ECHO Cleaning Current User's Temp Folders
FOR /D %%G IN ("C:'Documents and Settings'*.*") DO DEL/S/Q/F "%%G'Cookies'*.*"
FOR /D %%G IN ("C:'Documents and Settings'*.*") DO DEL/S/Q/F "%%G'Local Settings'Temp'*.*"
FOR /D %%G IN ("C:'Documents and Settings'*.*") DO DEL/S/Q/F "%%G'Local Settings'History'*.*"
FOR /D %%G IN ("C:'Documents and Settings'*.*") DO DEL/S/Q/F "%%G'Local Settings'Temporary Internet Files'*.*"
ECHO Done!
PAUSE
CLS

11 Jan 2011

Convert an IP Address from Decimal to Binary Form

Decimal to binary conversion is an important task to understand in IP addressing and Subnetting. IP addressing is a core functionality of networking today. The knowledge of how to assign an IP address, or determine the network or host ID via a subnet, is vital to any good network engineer. Having a good, solid understanding of the simple things makes more complex tasks easier. Here are steps on how to convert a decimal IP address to its binary form, without memorization.

  1. The first, and probably most important step, is to put down this row of values:  
    128 64 32 16 8 4 2 1

    In order to remember these values start with the number 1, go from right to left, and double that number seven times. For example, start with 1 on the right side. For your next number, double the 1 (1 x 2 = 2). So, 2 is your next number (remembering to go from right to left). For your third number, double the 2 (2 x 2 = 4); to continue the sequence, double the 4 (4 x 2 = 8). Repeat this process until you've doubled your original number, seven times. The key to this is that every single one of the values we put in that row are going to have either number 1 or number 0 assigned to it. To convert the IP address we will take that string of numbers and start from left to right this time. For each value we ask this question: "Can I subtract this value from the decimal remaining?" If the answer is "NO" then you put a "0" under the binary value, and if the answer is "YES" then you put "1" there.  

  2. We take the IP address: 154.31.16.13 and start with the first part, which is 154.
    1. Question: Can I subtract 128 from 154? Answer: YES. So we assign 1 to 128.  
      128 64 32 16 8 4 2 1
      1              
    2. Question: Can I subtract 64 from 26? Answer: NO. So we assign 0 to 64.  
      128 64 32 16 8 4 2 1
      1 0            
    3. Question: Can I subtract 32 from 26? Answer: NO. So we assign 0 to 32.  
      128 64 32 16 8 4 2 1
      1 0 0          
    4. Question: Can I subtract 16 from 26? Answer: YES. So we assign 1 to 16.  
      128 64 32 16 8 4 2 1
      1 0 0 1        
    5. That will give us a remainder of 10. (26-16=10). Question: Can I subtract 8 from 10? Answer: YES. So we assign 1 to 8.  
      128 64 32 16 8 4 2 1
      1 0 0 1 1      
    6. That will give us a remainder of 2. (10-8=2). Question: Can I subtract 4 from 2? Answer: NO. So we assign 0 to 4.  
      128 64 32 16 8 4 2 1
      1 0 0 1 1 0    
    7. Question: can I subtract 2 from 2? Answer: YES. So we assign 1 to 2.  
      128 64 32 16 8 4 2 1
      1 0 0 1 1 0 1  
    8. That will give us a remainder of 0. So for the rest of the values in our row, we can assign 0.  
      128 64 32 16 8 4 2 1
      1 0 0 1 1 0 1 0

      So now we know that a decimal number 154 is 10011010 converted to binary form. To double check, we take the values assigned with 1 and add them together: 128+16+8+2=154  

  3. Our next number in the IP address is: 31. So we start with a question from step 2 again
    1. Can I subtract 128 from 31?  
      128 64 32 16 8 4 2 1
      0              
    2. Can I subtract 64 from 31?  
      128 64 32 16 8 4 2 1
      0 0            
    3. Can I subtract 32 from 31?  
      128 64 32 16 8 4 2 1
      0 0 0          
    4. Can I subtract 16 from 31?  
      128 64 32 16 8 4 2 1
      0 0 0 1        
    5. Can I subtract 8 from 15 (remember, it's the remainder)?  
      128 64 32 16 8 4 2 1
      0 0 0 1 1      
    6. Can I subtract 4 from 7?  
      128 64 32 16 8 4 2 1
      0 0 0 1 1 1    
    7. Can I subtract 2 from 3?  
      128 64 32 16 8 4 2 1
      0 0 0 1 1 1 1  
    8. Can I subtract 1 from 1?  
      128 64 32 16 8 4 2 1
      0 0 0 1 1 1 1 1

      So the decimal number 31 is 00011111 converted to binary form. To double check: 16+8+4+2+1=31

  4. Next number is 16. I will perform the conversion in one step now.  
    128 64 32 16 8 4 2 1
    0 0 0 1 0 0 0 0

    So the decimal number 16 is 00010000 converted to binary form.  

  5. Next number is 13.  
    128 64 32 16 8 4 2 1
    0 0 0 0 1 1 0 1

    So the decimal number 13 is 00001101 in binary form. To double check: 8+4+1=13

So the IP address of 154.31.16.13 has its binary form equivalent of:

10011010.00011111.00010000.00001101

This is just the start of IP addressing and decimal-to-binary conversions. This is only one of the fundamentals covered in the CompTIA Network+ training video. The following course will teach you everything you need to know about the OSI model, different network protocols, network components, disaster recovery, IP addressing, and much more.

Creating a Partition During Windows 7 Installation

During the installation of Windows 7, you must choose a partition on which to install the operating system. Reading Microsoft's recommendations, you must make this partition at least 16GB in size. However, this is a minimal size and should not be used as the recommended size. As you know by now, the system partition (meaning the partition on which the operating system is installed on) is a place that just begs for more space as time goes by. Hotfixes, Patches, Service Packs, installed applications such as Microsoft Office and many others - all consume a lot of space on that partition. The more it is used, the more space will be consumed by these apps.

That is why it is strongly recommended to properly configure the partition's size. While it is possible to extend this partition (if un-used space is available on the hard disk - read my "Extending the System Partition in Windows 7" article), it is best to plan in advance. As a rule of thumb, I personally give that partition at least 40 GB of space, and when using more than one hard disk on the computer, I give it as much as 100 GB. Just in case.

Anyway, while it is possible to extend that partition later, even after installation of the OS, it is best to plan accordingly and create the right partition size during the installation process. Read my article on how to install Windows 7 for more information.

Starting a Windows 7 installation, after passing the first initial screens, you will get to the screen where you are asked which type of installation you want to perform.

At that point you will need to click on "Custom (advanced)", as this is a fresh installation of Windows 7.

The next screen will ask you where you want to install the system, meaning on what partition.

At that point, you need to decide on one of the two options:

  1. Install Windows on the entire available disk space
  2. Create a partition on the hard disk, and install Windows on that partition

If you pick option #1, then you simply click "Next" and get done with it. The setup program will create a partition on the entire hard disk and format it with the NTFS file system. It will then install Windows on that partition.

However, if you pick option #2 you can then create the partition exactly as you want it.

Click on "Drive options (advanced)". The screen will change and show you several new buttons:

New - to create a new partition.

Delete - to delete a specific partition - all data on that partition will be deleted!

Format - to format a specific partition - all data on that partition will be deleted!

Extend - to extend a partition beyond the barrier of the physical disk, and to span the partition on more than one physical disk. This is useful when you run out of space on that physical hard disk, and have brought in a new physical hard disk that you wish to use. However, unlike using that new disk as a totally new partition by itself, this disk (or part of it) becomes a part of a partition located on the first disk. While useful in some cases, this scenario might cause fault tolerance issues, because this extended partition is NOT fault tolerant, and if something happens to one physical disk, all the data on that extended partition becomes unavailable, and data loss can occur.

To create a new partition click "New". In the "Size" box, enter the size for the new partition. When done, click "Apply".

The setup program will let you know that it will create an additional partition on that drive. That partition will be, by default, hidden, and contain the necessary files to boot the computer. This partition will consume 100 MB of disk space.

Note: Actually, even if you do not manually create the partition by using this procedure Windows will still create this partition. However, since you did manually create the partition, Windows will tell you that another partition will also be created.

You can now see the partition you've created, and the hidden boot partition. In most cases, the partition on which Windows will be installed is partition number 2.

Press "Format" to format the new partition.

You'll be warned that all data will be deleted. That should pose no issue because the partition was just created, and it is blank.

Installation will now commence as usual.

Fact is that there's another way to manipulate partitions during the Windows installation. This is done by using the DISKPART command. This command is very useful for creating, extending, expanding, shrinking and performing other tasks on partitions and disks. To get to it you need to press SHIFT + F10 while the setup program is running.

A command prompt window will open. In it, type

diskpart

An interactive command will be displayed.

You can use /? to get to the DISKPART help.

Remember that you can always resize the system partition, but there's no substitution to a proper planning in advance!



Extending the System Partition in Windows 7

As you know by now, the system partition (meaning the partition on which the operating system is installed on) is a place that just begs for more space as time goes by. Hotfixes, Patches, Service Packs, installed applications such as Microsoft Office and many others - all consume a lot of space on that partition. The more it is used, the more space will be consumed by these apps.

Previous Microsoft operating systems had some internal mechanism to extend or expand partitions. But there were limitations on these operations, such as having the need for the disks to be configured as Dynamic Disks, and the fact that for a long period of time you could extend any partition as long as it's not the system partition. Some 3rd-party applications could (and still can) be used to extend partitions, but in this article we want to focus on internal tools.

Unlike previous Microsoft operating systems, Windows 7 now allows for an easy, out-of-the-box method of expanding those partitions and making them larger, while reliving us of these previous limitations.

Note: Of course, extending a partition requires one thing, and if you don't have it, there's no point in talking or thinking about extending any partition. That thing is "Free, unused space on the hard disk where the partition exists". You cannot extend a partition, any partition, if you've got nowhere to extend it to...

Extending a partition is done by using the Extend feature in Disk Management, or in the DISKPART command line executable.

Note: When you extend a partition, all data on the existing partition will NOT be erased, but it's better to be safe than sorry, therefore I always recommend using a good backup procedure to back up your data, just in case.

Note: While this article is specifically discussing extending system partitions, the procedures outlined here can be used to extend ANY partition, not just the system partition.

Also note that extending the system partition does not require a reboot.

Basically, there are 2 methods of extending the system partition in Windows 7:

Method #1 - Extending the system partition by using the GUI

1. Log on as an Administrator.

2. Go to Control Panel > System and Maintenance > Administrative Tools > Computer Management. You can also open the Computer Management application by using the Computer context menu. Select Computer Management.

In fact, you can go directly to the Disk Management MMC snap-in by typing diskmgmt.msc in the Start's search box or on the Run command.

If you're prompted for an administrator password or confirmation, type the password or provide confirmation.

3. Expand the Storage section, and in it go to the Disk Management console.

4. Select the disk you want to extend, for example Drive C.

5. Right-click the disk and select Extend Volume.

6. Click on "Next".

7. Windows 7 will tell you how much space can be added to the existing partition. You can manually enter the amount of space you want to add by changing the "Select the amount of space in MB" values. Note that you cannot enter a higher value than the value already present. Click on "Next".

8. The process will finish quite quickly, and a reboot is NOT required. You can notice the new partition size.

Method #2 - Extending the system partition by using the command line

Extending a partition or volume can be done via the CLI, or command line interface. In order to do that perform the following steps:

1. Click Start and type CMD, then press Enter. It is best to run the Command Prompt as an Administrator. To do so, right-click CMD and select "Run as Administrator".

When prompted to allow the Command Processor to run, click on "Yes".

BTW, you can also hover over the CMD line and press CTRL + SHIFT + ENTER to invoke the "Run as Administrator" shortcut.

2. In the command prompt type

Diskpart

3. Select the right disk drive and partition to work on. Typically, in Windows 7, this should be disk 0 and partition 2, but please make sure you do select the right disk and partition before continuing. You can do so by performing a LIST operation to view your existing disks and partitions BEFORE attempting to expand the wrong partition.

List disk

Select disk 0

List partition

Select partition 2

4. When the right disk and partitions were selected, run the EXTEND command. If you don't specify the size to extend by, then the command will extend the partition by using all of the contiguous space available on that disk.

Extend size=500

The above command will extend the partition by 500 MB.

Extend

The above command will extend the partition by using all of the contiguous space available on that disk.

BTW, do not confuse the extend command with the expand command, which, in Windows 7, is used to expand the size of virtual disks.

5. You may check the new partition size by running the list command, again.

List partition

6. You must now exit DISKPART by using the Exit command.

Exit

BTW, as a general tip and so that you know, you can use the above procedures also on Windows Vista, Windows Server 2008 and Windows Server 2008 R2.


Enable BitLocker Encryption on Vista

One of the most significant security enhancements to Windows Vista was the addition of a technology called BitLocker Encryption. Unlike EFS, rather than simply encrypting a single file, BitLocker, combined with a Trusted Platform Module (TPM) chip on a PC's motherboard, encrypts the entire hard disk or partition, thus making the system more secure. Since BitLocker encrypts the entire disk drive, the computer cannot be booted unless it can access the disk, and even removing the disk and placing it as a slave disk on a working computer cannot give you access to the disks' contents.

BitLocker is supposed to help users and companies to protect their data, especially executives traveling around with key corporate data on their laptops. BitLocker integrates with a TPM 1.2 chip and uses a 128-bit or 256-bit AES encryption algorithm. You can optionally use BitLocker on non-TPM systems, but to do that you must supply a USB memory key or an alphanumeric password in order to access the system.

Note: BitLocker is only available on Windows Vista Enterprise and Ultimate editions.

If your computers' motherboard is TPM complaint (meaning it has a TPM chip on the motherboard that is used hold encrypted keys), BitLocker will be enabled by default. If your motherboard is not TMP complaint then BitLocker will not be enabled by default, and you will need to enable it (that's what this article all about).

With a TPM compliant motherboard your computer will do all the work for you. Without it, you will need an external USB key to store the encrypted keys on, and you will need to insert it into the USB port every time you boot your PC.

To find out if your computer has Trusted Platform Module (TPM) security hardware

Go to Control Panel and click on the Bitlocker Icon. If you don't see a BitLocker icon there's a high probability that your computer does NOT has a TPM compliant motherboard.

If you do see a BitLocker icon, double-click on it to open it. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

If the TPM administration link appears in the left pane, your computer has the TPM security hardware. If this link is not present, you will need a removable USB memory device to turn on BitLocker and store the BitLocker startup key that you'll need whenever you restart your computer.

Disk requirements

Before you can turn on BitLocker Drive Encryption you need to make sure that your computer's hard disk has the following:

  • At least two volumes. Note: If you create a new volume after you have already installed Windows, you will have to reinstall Windows before turning on BitLocker. If you do not already have two partitions, you can use the BitLocker Drive Preparation Tool to help get your system ready for BitLocker by creating the required second partition. You can get the BitLocker Drive Preparation Tool from the Windows Update site/tool. After you have installed this tool, type BitLocker into the Start menu search box, and then double-click BitLocker Drive Preparation Tool to run the tool. After the tool runs, you must restart your computer before turning on BitLocker.  
  • One volume is for the operating system drive (typically drive C) that BitLocker will encrypt, and one is for the active volume, which must remain unencrypted to start the computer. The size of the active volume must be at least 1.5 gigabytes (GB). Both partitions must be formatted with the NTFS file system.

To enable BitLocker without a TPM compliant motherboard please follow the proceeding steps:

  1. Click Start > Accessories > Run
  2. In the Run Dialog box type gpedit.msc and press Enter.
  3. In the Group Policy window navigate to Computer Configuration > Administrative Templates > Windows Components > BitLocker Drive Encryption
  4. In the right pane double-click on Control Panel Setup: Enable advanced startup options  
  5. In the properties window click the radio button next to the 'Enable' option and then click OK  
  6. Refresh the Group Policy by typing gpupdate /force in the Start > Accessories > Run command.
  7. Go to Control Panel and click on the Bitlocker Icon. If you don't see a BitLocker icon you're probably not in Classic View. Either switch to Classic View, or type bit in the search box on the top right corner of the Control Panel window. You should see a link now for enabling BitLocker.  
  8. If you're like me, then your computer's hard disk is not set up to support the usage of BitLocker, and you'll get a window like this one:  

You will need to use the BitLocker Drive Preparation Tool to prepare your disk drive for BitLocker. I will prepare a demo on this in later articles.