Skip to main content

Posts

Showing posts from December, 2010

Happy New Year!!!

Thank you to all my clients who have made 2010 such a good year.  I’m looking forward to spending 2011 with all of you.

How to mount a VHD in Disk Management

To complete this you will need a Windows 7 or Windows Server 2008 R2 client available. Click Start and type Disk Management . In the menu, click Create and format hard disk partitions .  This will open up Disk Manager Click Action \ Attach VHD Next, enter the location of your VHD file and click OK Notice that you can check the box to mount the VHD in Read-only mode. The drive will be loaded and you can open it just like it was an actual hard drive.

Using SConfig to set IP address on Server Core 2008 R2

Microsoft gave us a nice tool to use with the release of Windows Server 2008 R2 when working with server core. To set the IP address on Server Core 2008 R1, you would have to follow this procedure: · Type netsh interface ipv4 show interfaces · Press Enter · Record the name of the interface you want to set a static IP address for. Sample output is below. Idx Met MTU State Name --- --- ----- ----------- ------------------- 3 5 1500 Connected Local Area Connection · Type netsh interface ipv4 set address name=3 source=static address=10.10.1.10 mask=255.255.0.0 · Optionally, you can add a gateway address by appending gateway= address to the end of the command. · In the Name parameter, we used the Idx value. We could have also typed “ Local Area Network” . The above method still works if you need to batch file something. Now with the R2 version, you can use a menu based system thanks to SConfig . On you Server Core 2008 R2, log in and type sconfig . Press 8

RSAT (Remote Server Administration Tools)

For Windows Server 2000 and 2003, the installation media contained a support tools folder that allowed us to install the server management software on our clients. From Windows Server 2008, you need to download them. Below are the links to RSAT for both Vista and Windows 7. Remember to down load the correct version for both OS and processor. Below are the installation instructions from Microsoft. 1. On a computer that is running Windows 7, download the Remote Server Administration Tools for Windows 7 package from the Microsoft Download Center. 2. Open the folder into which the package downloaded, and double-click the package to unpack it, and then start the Remote Server Administration Tools for Windows 7 Setup Wizard. Important: You must accept the License Terms and Limited Warranty to start to install the Administration Tools pack. 3. Complete all the steps that you must follow by the wizard, and then click Finish to exit the wizard when installation is completed. 4. Cli

Change Server Core 2008 R2 Windows Update Settings

In Server Core 2008 R1, this was a bit of a mess.  Microsoft provided us with a script.  We had to type: Cscript c:\Windows\system32\scregedit.wsf /AU 4 to turn Automatic updates on. To turn them back off we had to type Cscript c:\Windows\system32\scregedit.wsf /AU 0 . With R2, we have an easier method.  Type sconfig and press Enter Press 5 for Windows Update Settings . Press A for Automatic or M for Manual . You will receive the prompt above to let you know that you disabled Automatic updates or, you will see the one below if you turned them on.

How to tell how long it has been since a computer logged in with PowerShell

This is an easy one liner in PowerShell. Open PowerShell V2. Once open, we need to access the Active Directory objects by typing Import-Module ActiveDirectory . Now Type Get-adcomputer –filter * -properties lastlogondate | Where {$_.LastLogonDate –le [DateTime]::Now.AddDays(-7)} We first use the Get-ADCopmuter cmdlet to access the computer objects in Active Directory. Setting –filter * allows us to work with all the computer objects. Next we added the –properties LastLogonDate . This is done because that attribute is normally now returned with the object. Second, we piped the output of the first command to the Where cmdlet. The $_.LastLogonDate variable looks at each input one at a time and grabs the LastLogonDate attribute for analysis. We then compare it to [DateTime]::Now.AddDays(-7) This command gets the current date/time from the host and subtracts 7 days from it. We then use the –le comparision operator (Less than or equal to) to determine if the dat

Will a file screen look inside a .ZIP file?

From my testing, it does not. I set up a file screen to prevent .TXT files from being copied into a folder. In another folder that was not screened, I created two text files and then sent them to a compressed (.zip) file. I was able to copy the .zip file to the screen folder. To help prevent blocked files from being saved to restricted locations, you may want to consider also blocking .ZIP files.

Making sure your OUs have Deletion Protection

Deletion Protection is a feature that prevents an OU from being accidently deleted.  This is a feature of Windows Server 2008.  For those servers upgraded from Windows Server 2003, Deletion Protection is not turned on.  Until now the only way to turn on the Deletion Protection is manually.  Well, now you can use PowerShell V2 to take care of this for you. Windows PowerShell V2 comes installed on Windows 7 and Windows Server 2008 R2. For previous versions of Windows, you can download PowerShell V2 from here: http://support.microsoft.com/kb/968930 You will also need to make sure the Active Directory Module for Windows PowerShell is installed.  This can be found as a feature in the Remote Server Administrator Tools . The First step is to launch the PowerShell environment.  If you do not have an icon on the screen, you will find it is  Start \ All Programs \ Accessories \ Windows PowerShell \ Windows PowerShell Once the Shell loads, you need to add the Active Directory module by t

How to prevent users from shutting down the PC

There may be situations in which you do not want to allow a user to shut down a client. This is an easy one to fix. In Group Policy expand User Configuration \ Policies \ Administrative Templates \ Start Menu and Taskbar . Enable the policy for Remove and Prevent access to the Shut Down , Restart, Sleep, and Hibernate commands . Or you can set it in the local policies on the client. User Configuration \ Administrative Templates \ Templates \ Start Menu and Taskbar . Enable the policy for Remove and Prevent access to the Shut Down , Restart, Sleep, and Hibernate commands .

Rename a Server Core 2008 R2 Server

This is now a very easy task over the R1 version.  The R1 method involed using the NETDOM command.  It went something like this: netdom RenameCOmputer Old-Name /NewName:New-Name you then had to manually reboot the machine by typing Shutdown /r /t 0 . In Server Core 2008 R2, you can use the sconfig command. Log into your server core server. Type sconfig and press enter . Type 2 for Computer Name: and the press Enter . Enter the computer name and press Enter . You will then be asked for the username of a user who has the rights to change this servers name and then press Enter .. A new window will open up asking for that users password.  Enter it and press Enter . You will need to click Yes to reboot the server.

How to clear the print queue when the user logs off (Domain Version)

A common problem with using a client that multiple users log into is that a sensitive document could be stuck in the local print queue. With law suit heavy lawyers running around, you do not want to put your organization at risk. The below procedure will help to mitigate this issue. (Note: The following procedure is performed and tested on Windows 7) This procedure will set up your clients to clear their print queues when a user logs off. This prevents the printer from coming online and printing sensitive information when another user logs on. On your Windows 7 client, click , type Notepad and press Enter . Copy and past the following code: net stop spooler del %systemroot%\system32\spool\printers\*.shd del %systemroot%\system32\spool\printers\*.spl net start spooler Click File \ Save As In the Save as Type: dropdown box, select All FIles . In the File name: box, type C:\DeletePrinJobs.cmd . In a production environment, you may want to put this somewher

Can you use a file screen to prevent files from being redirected?

Yes you can. The scenario here is we have set up our clients, through Group Policy, to redirect the desktop to a server. I have also set up a files screen on the shared folder that will host the data. This file screen is configured to block .TXT files. When the user tries to create a .TXT file on their desktop, they are prevented from doing so. Below is the setup procedure to do this. Step 1: configure the folder to hold the user data. I created a folder on my server Next I shared it by right clicking the folder and selecting Properties .   Click Advanced Sharing . Click Permissions . Click Add In the Enter the object names to select box, type Authenticated Users and click Check Names. Click OK Click Authenticated Users Check Full Control . Click OK Click OK Click Close The folder is not set up for your users to have their desktops redirected to this location.   Step 2 We now need to create the Group Policy that will redirect the users deskto