itramblings

Ramblings from an IT manager and long time developer.

By

Sudo for Windows

With the existance of UAC in the windows world, I find my self looking for easier ways to run a command as administrator (usually via command line) without needing to turn off UAC.

Here are some useful links that helped me solve this very issue

Elevation Power Toys

http://technet.microsoft.com/en-us/magazine/2008.06.elevation.aspx  (note, you also need to sysinternals suite installed in “%ProgramFiles%Sysinternal Suite”

Elevate Utility

http://code.kliu.org/misc/elevate/

Sudo for windows

http://sourceforge.net/projects/sudowin/

By

Information about ADFS

http://marcvaneijk.wordpress.com/2010/06/12/sharepoint-2010-and-adfs-2-0-the-complete-step-by-step-guide/

http://malcolmplested.blogspot.com/2011/06/setting-up-adfs-with-office-365.html

By

A couple of useful free tools

FreeCommanderis an easy-to-use alternative to the standard windows file manager. The program helps you with daily work in Windows. Here you can find all the necessary functions to manage your data stock. You can take FreeCommander anywhere – just copy the installation directory on a CD or USB-Stick – and you can even work with this program on a foreign computer.

FuturixImager is a compact and customizable image viewer. It is capable of opening more then 40 file types, including all most popular ones (GIF, JPEG, PNG, TIFF, JPEG2000, raw, DNG).

Texter saves you countless keystrokes by replacing abbreviations with commonly used phrases you define. Unlike software-specific text replacement features, Texter runs in the Windows system tray and works in any application you’re typing in. Texter can also set return-to markers for your cursor and insert clipboard contents into your replacement text, in addition to more advanced keyboard macros.

Stickies is a PC utility was written to try to cut down on the number of yellow notes I was leaving stuck to my monitor. It is a computerised version of those notes. The design goal behind Stickies is that the program is small and simple. Stickies will not mess with your system files, or write to the registry. Stickies stores information in a single text-based ini file. 

ShellRunAs is a command-line tool call Runas that is handy for launching programs under different accounts, but it’s not convenient if you’re a heavy Explorer user. ShellRunas provides functionality similar to that of Runas to launch programs as a different user via a convenient shell context-menu entry. Read more..

Command Prompt Here tool

By

How to display hidden NIC card drivers in Windows Server

http://support.microsoft.com/kb/269155

  1. Click Start, click Run, type cmd.exe, and then press ENTER.
  2. Type set devmgr_show_nonpresent_devices=1, and then press ENTER.
  3. Type Start DEVMGMT.MSC, and then press ENTER.
  4. Click View, and then click Show Hidden Devices.
  5. Expand the Network Adapters tree.
  6. Right-click the dimmed network adapter, and then click Uninstall.

By

Application Pool Recycle Utility for SharePoint Developers

This is a copy from here….

This freeware application is a System Tray utility for providing quick access to common IIS tasks which are useful on a SharePoint development box. It may also be useful to others working with IIS. In essence, it enumerates the app pools on your box and lets you right click ’em to bounce ’em!

If you are experiencing problems with APM, please see the FAQ.

 


Version 3.0.0.0 (7th December 2009)

SharePoint 2010 and IIS7 only

apm3a[3]

removal of IIS6 legacy code 
addition of new SP2010 services 
SharePoint to IIS App Pool name mapping

Download 
Application Pool Manager 3.0.0.0.

 


Version 2.0.0.0 (27th November 2008)

APM 2.0.0.0

Complete rewrite 
Vastly reduced working set 
Full Vista support 
UAC manifest 
IIS status detection 
IIS6 operations use legacy APIs 
IIS7 operations use Microsoft.Web.Administration 
Event Logging

Download 
Application Pool Manager 2.0.0.0.

 


Version 1.1.0.0 (23rd May 2008)

APM 1.1.0.0

 

New Options Layout 
Form does not show on start up 
Warm Up and IISReset now run in the background 
Option to hide Tool Tips 
Ability to hide Application Pools 
Restart WSS Timer & WSS Admin Services 
STSADM now works on localised versions of Windows Server 
Ability to exclude STSADM from Warm Up 
PID displayed on context menu for spun up Application Pools 
Version Check

Download 
Application Pool Manager 1.1.0.0.

 


Version 1.0.3.0 (10th August 2007)

Added Tooltip to display Process ID if an app pool has spun up. Refreshes in event of recycle. 
Does not depend upon iisapp.vbs

Windows 2008/Vista Support: Requires Legacy IIS WMI.

Download 
Application Pool Manager 1.0.3.0.

 


Version 1.0.2.0 (14th April 2007) 

Added Support for Windows Vista. 
Added ability to refresh the list of Application Pools. 
Removed dependency upon the “Warm Up” scripts. 
Added ability to “warm up” multiple URLs. 
Improved notifications. 
Removed ‘Recycle’ tooltip which caused artifacts on Virtual Machines. 
Improved keyboard navigation.

 

Application Pool Manager 1.0.2.0

System Requirements 
Windows Server 2003 Service Pack 1 or later, or Windows Vista. 
Internet Information Services 6.0 or 7.0 (with IIS6 Management Compatability installed). 
.NET Framework 2.0.

Download 
Application Pool Manager 1.0.2.0.

Instructions for post event warm ups: 
Enter the full URLs (including http:// , /default.aspx or /pages/default.aspx etc) in comma seperated format. Warm ups do not support HTTP 302s. There is no need to install the Warm Up scripts with this version. If you are upgrading from the previous version, remove the Path within applicationpoolmanager.config, this is no longer required.

 


Version 1.0.1.0 
Added Event Notifications. 
Added ability to perform an IISReset. 
Added ability to perform post event “Warm Ups”.

System Requirements 
Windows Server 2003 Service Pack 1 or later. 
Internet Information Services 6.0 
.NET Framework 2.0

Download 
Application Pool Manager 1.0.1.0

 

Instructions for configuring post event “Warm Ups”.

This requires the Warm Up Scripts posted by Joel Oleson. Download the ZIP file and extract the contents to a folder on your local disk (e.g. c:warmup).

  1. Within the Options dialog of Application Pool Manager, select the Enable Post Events Warm Up check box.
  2. In the Path to WarmUpServer.cmd text box, enter the path you extracted the scripts to. 
    Note: do not include a trailing slash, or the filename itself.
  3. In the URL to Warm Up text box, enter the hostname you wish to warm up. 
    Note: do not include http:// or a trailing slash.
  4. Click OK to save the configuration. The configuration is persisted in the ApplicationPoolManager.config file.

Following a IISReset or Application Pool Recycle event, WarmUpServer.cmd will be run, and you will receive notifications of it’s progress:

  

Note that the file startup.bat is redundant and not required. STSADM is run to warm up the admin interfaces by Application Pool Manager. Also there will be a delay whilst the HTTP GETs performed by WarmUpServer are executed before the final notification is displayed.

Don’t forget to modify the WarmUpServer.cmd file to reference correct URLs for your SharePoint Central Administration and Shared Services Provider Administration web sites.

 

 

What might get done in the next version.

  •  
    • Allow associations between Application Pools and Warm Up Hosts. 
      e.g SharePoint Intranet App Pool when recycled warms up http://intranet/ but 
      SharePoint WCM App Pool when recycled warms up http://wcm/
    • Removal of initial display of About/Options form (if I can figure out how to do that).
    • Activate via keyboard shortcut (if I can figure out how to do that).
    • Add keyboard shortcuts for each Application Pool displayed.
    • Add ability to hide Application Pools (e.g. SharePoint Central Administration v3).
    • Add Start and Stop operations.

If you have feature requests, please leave a comment here. No promises!!

By

Backup Tools

Acronis True Image (http://www.acronis.com)

DriveImage XML (http://www.runtime.org/driveimage-xml.htm)

By

Running 32-bit version of the Windows Side Bar on x64 System

After getting Windows 7 x64 installed, I was having a problem getting a few gadgets to work correctly (like the Pandora Gadget). It turns out this gadget uses Flash, which only comes in a 32 bit version. The Sidebar is x64, and can’t access Flash. Since there is no x64 version of flash (come on Adobe — its time to bite the bullet!!), I started digging around for a way to overcome this limitation — as luck would have it, Microsoft ships the 32-bit version of the side bar in the x64 versions.  Now all I needed to do was get it to startup instead of the default x64 bit version.

Edit the following Registry Key:
\HKCUSoftwareMicrosoftWindowsCurrentVersionRunSideBar

Change the key to this: C:Program Files (x86)Windows Sidebarsidebar.exe /autoRun

(The only addition is loading sidebar.exe from c:program files (x86) instead of c:program files)

This should get you by until Adobe gets their act together!

By

Resizing a VHD drive

Resizing a VHD drive is not particularly complicated, it just involves a number of steps.

To Shrink

  1. Mount the VHD in Windows 7/2008 using Disk Management Tools (or DISKPART)
  2. Defragment the drive, makeing sure the free space is also defragmented (UltraDefrg in Optimize mode is a good free tools for this)
  3. Resize the main parition using Disk Management Tools (or DISKPART)
  4. Unmount the VHD Drive
  5. Resize the actual VHD file (VHDResizer is a great tool for this)
    1. http://sysadmingeek.com/articles/how-to-resize-a-microsoft-virtual-hard-drive-vhd-file/

To Expand

Resize the actual VHD file (VHDResizer is a great tool for this)

  1. http://sysadmingeek.com/articles/how-to-resize-a-microsoft-virtual-hard-drive-vhd-file/
  2. Mount the VHD in Windows 7/2008 using Disk Management Tools (or DISKPART)
  3. Defragment the drive, makeing sure the free space is also defragmented (UltraDefrg in Optimize mode is a good free tools for this)
  4. Resize the main parition using Disk Management Tools (or DISKPART)
  5. Unmount the VHD Drive

 

By

Using Windows Server 2008 as a SUPER workstation OS [Part 2]

[Note: This is a copy of this post]

This is a continuation of my previous post  Using Windows Server 2008 as a SUPER workstation OS

Here are a couple of things I missed in my previous post

11. Processor Scheduling

As pointed out in a comment on my previous post; On Windows Server 2008 background services are given preference over interactive programs. You can change this behavior by

Control Panel > System and Maintenance > System > Advanced System Settings > Advanced > Performance > Settings > Advanced > Processor Scheduling

Setting this to Programs will make foreground programs more responsive.

12. Visual Effects

One thing you will notice on Windows Server 2008 is that by default you will not see Preview Thumbnails in your Documents / Music / Video folders. This has to be enabled explicitly.

Control Panel > System and Maintenance > System > Advanced System Settings > Advanced > Performance > Settings > Visual Effects

Based on your preference you can tweak these settings.

13. Power Options

Do your bit for a Green World! The Balanced (default) power plan on Windows Server 2008  does not turn off hard disks by default. On Vista hard disks are turned off after 20 mins. You can change this by

Control Panel > Hardware and Sound > Power Options > Change plan settings

It does take a bit to kick start the hard disks when you resume work but that’s a sacrifice worth making for a greener world :).

14. IE Enhanced Security 

IE Enhanced Security Configuration has been moved from Add Remove Windows Components (on Windows 2003) to the Server Manager on Windows Server 2008.

Server Manager > Security Information > Configure IE ESC

You now have a choice to disable it only for Administrators. 

And to end with a couple of clarifications

* Why am I recommending Windows Server 2008 over Windows Vista ?

I am not!

* How to get Sidebar / Media center on Windows Server 2008?

My honest opinion would be to look for alternatives.

* Will hardware problems go away moving to Windows Server 2008?

Not likely. One of the biggest complaints against Vista was hardware issues. Without proper  drivers from your hardware vendors your ride on Windows Server 2008 is again going to be bumpy. For me all Vista compatible drivers worked fine with Server 2008 and I believe they should work for you as well.

* Will all software work on Windows Server 2008?

Most will but some setups detect Windows Server 2008 as a server OS and may not install. The compatibility mode does not have a Vista option only XP / Windows 2003 and other legacy OS.

By

Using Windows Server 2008 as a SUPER workstation OS [Part 1]

[Note: This is a copy of this post]

Windows Server 2008 is the best OS to be released till date from Microsoft’s stable. And the moment I got hold of the RTM build I could not resist installing it on my workstation. Due to the nature of my work I always prefer running a Server OS on my main workstation… I have been running Windows 2003 disguised as XP (with all the themes and stuff) all these days.

So here is my tale of how I went about setting up Windows Server 2008 to look and fell like its desktop counterpart Windows Vista.

1. Enable Hardware Virtualization

My workstation is a x64 machine with hardware virtualization capabilities. This means I can run Hyper-V on my machine. Even if your machine’s hardware supports virtualization it is most likely not going to be enabled by default. You have to enable it via your BIOS setup.

2. Install the latest Graphics and Audio drivers

Being a server OS Windows 2008 carries with it basic graphics and audio drivers. To utilize the full strength of your hardware ensure you install the latest drivers for both graphics and audio hardware. Only with the proper graphics drivers will you be able to enable the “Aero” experience on Windows 2008.

3. Desktop Experience Feature

The Desktop Experience Feature enables a bunch of stuff that is by default present on a desktop OS. Most importantly it includes Themes, Windows Media player and the Aero related features. You will have to enable it form the Server Manager. The “Turn Windows features on or off” / “Add remove windows components” has all been rolled into the Server Manager now.

Server Manager > Features > Desktop Experience

Installing the Desktop Experience feature does not enable them. You have to manually set them up.

4. Themes

To enable Themes you will basically have to enable the Themes Service. Again being a server OS it is not enabled by default.

Services.MSC > Themes

Set the start up type to Automatic

Enabling the Aero Theme.

For this go to Control Panel > Personalization >Theme and select Windows Aero

5. Search

Search is also disabled by default on Windows 2008. Searching is important for me as I use it a lot to find my emails. To enable search you will have to add the File Services Role via Server Manager.

Server Manager > Roles > File Services > Windows Search

Outlook relies on this search service.

6. Disable Shutdown Event Tracker

Since I am using it as a workstation I do not want to keep a track of all the Shutdowns. The Shutdown Event Tracker is the pop up that you get asking you for a shutdown reason. To disable it

Open mmc.msc

Add the Group Policy snap-in

Under Administrative Templates expand System

Set Display Shutdown Event Tracer to Disabled

7. Audio

For audio you need to enable the Windows Audio service. You do this by setting the startup type to Automatic.

Services.msc > Windows Audio

Ensure you have proper drivers for your audio hardware… for me the default driver was not enabling the headphones … it started working fine after I got the proper driver.

8. SuperFetch

As a workstation, enabling SupertFetch will give you that additional bit of responsiveness. The SuperFetch services is disabled by default and when you try to enable it you will most likely get an error message “The operating system is not presently configured to run this application

You will have to make two registry changes to enable this service. I basically copied them over from my Vista machine.

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerMemory ManagementPrefetchParameters

EnablePrefetcher DWORD 3

EnableSuperfetch DWORD 3

9. Get a codec pack.

For media hungry buffs download a codec pack. This will ensure you can play all media files.

10. Enable Hyper-V

With Hyper-V you can run virtual machines on your workstation. This is useful if you want to run your tests on older OS versions. Enabling  Hyper-V is easy

Server Manager > Roles > Hyper-V

Remember you need a Hyper-V enabled Windows 2008 licence and also your hardware has to support virtualization.

Also If you are using an existing VHD it may ask you to re-Activate Windows as it detected hardware changes.

One good thing about Windows Server 2008 is that it no longer asks for the i386 folder like Windows 2003 while you enable features.