Friday, December 11, 2009

Redirecting Web Sites in IIS

To redirect requests to another Web site or directory
1.
In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2.
Click the Home Directory, Virtual Directory, or Directory tab.

3.
Under The content for this source should come from, click A redirection to a URL.

4.
In the Redirect to box, type the URL of the destination directory or Web site. For example, to redirect all requests for files in the Catalog directory to the NewCatalog directory, type /NewCatalog.


To redirect all requests to a single file
1.
In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2.
Click the Home Directory, Virtual Directory, or Directory tab.

3.
Under The content for this source should come from, click A redirection to a URL.

4.
In the Redirect to box, type the URL of the destination file.

5.
Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.


You can use wildcards and redirect variables in the destination URL to precisely control how the original URL is translated into the destination URL.

You can also use the redirect method to redirect all requests for files in a particular directory to a program. Generally, you should pass any parameters from the original URL to the program, which you can do by using redirect variables.

To redirect requests to a program
1.
In IIS Manager, expand the local computer, right-click the Web site or directory you want to redirect, and click Properties.

2.
Click the Home Directory, Virtual Directory, or Directory tab.

3.
Under The content for this source should come from, click A redirection to a URL.

In the Redirect to box, type the URL of the program, including any redirect variables needed to pass parameters to the program. For example, to redirect all requests for scripts in a Scripts directory to a logging program that records the requested URL and any parameters passed with the URL, type /Scripts/Logger.exe?URL=$V+PARAMS=$P. $V and $P are redirect variables.

4.
Select the The exact URL entered above check box to prevent the Web server from appending the original file name to the destination URL.


Source: http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/6b855a7a-0884-4508-ba95-079f38c77017.mspx?mfr=true

Friday, December 4, 2009

How to Sysprep Windows

Every time I need to set up a bunch of virtual machines, I have to go back and look up where to find the Sysprep tool and how to use it. Here are the details so I can find it in the future...

In case you haven't encountered Sysprep before, it is a tool that allows you to create a base OS image (including Windows, Office, Visual Studio, or whatever other applications you want) and then re-package it. You can then create cloned disks (or just copy the whole thing) and when you boot the new disk, it is like booting Windows for the first time, except with all your software installed. You get to choose a new computer name, SIDs are regenerated, etc.

Each version of Windows requires the correct version of Sysprep. Where do you find the correct version of Sysprep? On your install disks in :\Support\Tools\Deploy.cab. Although System Preparation tool for Windows Server 2003 Service Pack 2 Deployment claims to install the Sysprep tool, I've never been able to make it work on my system. So don't bother wasting your time. Go to your original install media and grab the file from there.

Creating the Sysprep Image

  1. Open :\Support\Tools\Deploy.cab and extract setupcl.exe, setupmgr.exe, and sysprep.exe to C:\Sysprep. (N.B. C: is your system drive. If you installed Windows to another drive letter, use that drive letter rather than C:.)
  2. Run setupmgr.exe from C:\Sysprep.
  3. The Setup Manager wizard starts. Click Next...
  4. Create new... Next...
  5. Select "Sysprep setup". Next...
  6. Select the correct OS version... Next...
  7. Select "No, do not fully automate the installation"... Next...
  8. Enter Name and Organization, Time Zone, Product Key, and Workgroup or Domain. The other settings can remain defaulted. Note that you don't want to specify the computer name since you will be creating multiple computers from the base image and you don't want to specify the admin password, even encrypted. If the sysprep program can extract the password from the answer file, so can any hacker worth their salt. Click Next... through to the end.
  9. Finish... Save to C:\Sysprep\sysprep.inf. OK...
  10. Wait while Setup Manager finishes. Cancel... (Yes, odd way to exit a program that has completed successfully.)
  11. Run sysprep.exe.
  12. Click OK.
  13. Ensure that "Don't regenerate security identifiers" is UNCHECKED. You want to regenerate the SIDs when each new clone boots.
  14. Click Reseal, OK to confirm that you want to regenerate SIDs, and wait for the system to shut down.

Creating a Cloned Server

  1. If you're using VMWare Workstation, create a linked clone of your Sysprepped server. (You can also create a new linked disk using VirtualPC using File... Virtual Disk Wizard and then creating a new VM using the linked disk.)
  2. Change any VM settings such as memory. DO NOT change number of processors from 1 to 2 as the HAL (hardware abstraction layer) for uni-processor vs. multi-processor Windows is different. Your system will blue screen if you do this.
  3. Boot the cloned server.
  4. The Windows Setup wizard will appear. Next...
  5. Accept the license agreement. Next...
  6. Enter a new computer name and administrator password. Next...
  7. Windows will boot and you can log in with the administrator password you just entered.
  8. When prompted, click "Yes" to update your product activation.
  9. Select "Yes, let's activate Windows over the Internet now". Next...
  10. Select "No, I don't want to register now; let's just activate Windows". Next...
  11. OK...
  12. Update this server... to go to Microsoft Update.
  13. Once you're ensured that your patches are up-to-date, you can close the browser and click Finish... then Yes... on the dialog to start using Windows.

You should now have a fresh copy of Windows. You can create as many cloned servers as you need for your mini-network.

Original Source: http://www.jameskovacs.com/blog/HowToSysprepWindows.aspx

How to Sysprep Windows Server 2008

c:\Windows\System32\sysprep\sysprep.exe

Simply run sysprep.exe above and you are presented with:

image

Check the "Generalize" checkbox (regenerates system SID), change the Shutdown Options to "Shutdown", and click OK. The system will go through the sysprep process and shut itself down.


How to reset Internet Protocol (TCP/IP)

  1. To open a command prompt, click Start and then click Run. Copy and paste (or type) the following command in the Open box and then press ENTER:
    cmd
  2. At the command prompt, copy and paste (or type) the following command and then press ENTER:
    netsh int ip reset c:\resetlog.txt
    Note If you do not want to specify a directory path for the log file, use the following command:
    netsh int ip reset resetlog.txt
  3. Reboot the computer.

Monday, November 30, 2009

Microsoft, Windows Server, 2003, Synchronization and Backup

Rsync for windows or any other good sync program should be able to determine the time zone and handle that as part of the sync process.

also see

Suresync from a company called www.softwarepursuits.com file sync
Works good. has scheduling and synching of directories of your choice.
Very flexible. A demo should be available.
also
Folder synchronization
http://www.plaxoft.com/en/products/foldersync/P027BAA01-5ECB-4F9B-98FD-92B152620B7D.php3
http://www.foldermatch.com/
http://www.foldermatch.com/fmcompetitors.htm
http://www.juul.stejle.dk/article.asp?DocumentID=182
http://geekman.subportal.com/sn/Utilities/File_Synchronizing_Utilities/

------------------------------------------------------------------------------
Here's a link to the RSYNC Project:

http://rsync.samba.org/

Here's the Novell RSYNC forum:

http://forge.novell.com/modules/xfmod/newsportal/thread.php?group_id=1148&group=novell.forge.rsync.help

And here's a good resource for RSYNC on Windows:

http://art.wilderness.org.au/software/help_cygwin-rsync.shtml

Here are two more good RSYNC Windows links:

http://www.itefix.no/phpws/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=6&MMN_position=23:23

http://www.nasbackup.com/

The NASBackup Project is a neat Open Source effort to make a gui-based RSYNC client for Windows. It works very well.

Article Orginal Source: http://www.experts-exchange.com/Software/System_Utilities/Remote_Access/VPN/Q_22767967.html

How to use offline files in Windows XP

Configuring your computer to use Offline Files
To configure your computer to use the Offline Files feature:
Click Start, and then click My Computer.
On the Tools menu, click Folder Options.
Click the Offline Files tab.
Select the Enable Offline Files check box, and then click OK.
Back to the top
Making files or folders available offline
To make shared network files or folders available when you are offline:
Click Start, and then click My Computer.
Click My Network Places.
Double-click the network place that contains the folder or file that you want to make available offline.
Right-click the file or folder that you want, and then click Make Available Offline. The Offline Files Wizard starts. Click Next to continue.
Select the Automatically synchronize the Offline Files when I log on and log off my computer check box, and then click Next.
Select the Create a shortcut to the Offline Files folder on my desktop check box, and then click Finish. The files are copied to your computer, and a "Shortcut to Offline Files" folder is displayed on the desktop.
NOTE: When you make other files available offline, they are displayed in the "Shortcut to Offline Files" folder.

It is also possible to use offline files with third party servers if they have SMB (Server Message Block) protocol installed. With the SMB protocol, you can use this feature from heterogeneous servers, such as Netware and UNIX.

Ensure that your network administrator has setup your UNIX or Netware servers to use the SMB protocol to share files on the network. They can use a product, Samba, for example, to setup SMB on your servers. Once SMB is running on the server, you can use Windows XP to connect to those files and make them available offline like you would if the server was a Windows-based server.

Article Orignal Source: http://support.microsoft.com/kb/307853

Setting up SSL with a SelfSSL certificate on Windows Server 2003




"If you set a host header in IIS and you specify that name in SelfSSL you will NEVER see a security warning (because the name of the certificate and the server matches).

Now if you try to access the site from another computer, you WILL get a security warning (not from a trusted authority). This can be avoided if you export the certificate to a file and then import it on the computer from which you want to access the site.

In fact, using self-signed certificates is a great way to ensure your intranet is just as safe as using a 'paid for' certificate - what can be more safe than a certificate that has never left the building - it's guaranteed, that no one has changed it on its way."

Method:

Run iis60rkt.exe. You will see the welcome screen - click Next



In the next dialog, read over the EULA and select "I agree" and press Next. In the next dialog, you can usually just press "Next" because your information is usually entered already.



Now in this next dialog, select "Custom" and press "Next"



Here you can change the path of where it installs, just click Next. In the next dialog we have an option of what we can install. In this tutorial I will only be installing "SelfSSL" so I will unselect everything else. You can install whatever looks interesting, if you wish.



Now you will be presented with an overview, you can click "Next" and the install will copy the selected files. When that's done, click "Finish"

Now we will create a certificate. Click Start -> All Programs -> IIS Resources -> SelfSSL -> SelfSSL



Type "selfssl /T", without the quotes and press "y" when prompted. Rocky reported that if you type "selfssl /T /N:CN=" then you will only be prompted once in Internet Explorer to accept the certificate. Thanks Rocky



Now load "https://localhost" in Internet Explorer, and click "Yes" to view a secure site. You will be presented with the following warning:



That is because SelfSSL makes a certificate only meant to be used in testing. The connection will still be a secured one, but every time you load it you will get that message.

That's all! I hope you found this information useful.

Orginal Site: http://www.visualwin.com/SelfSSL/