Vol. 17, #7 - February 13, 2012 - Issue #866 

PowerShell Tips and Resources

  1. Editor's Corner    
    • From the Mailbag
    • PowerShell Tips and Resources
    • Tip of the Week
    • Recommended for Learning
    • Quotes of the Week
  2. Admin Toolbox
    • Admin Tools We Think You Shouldn't Be Without
  3. Webinars & Seminars
    • Conferences, Expos and Other Events  
    • Upcoming Microsoft Events and Webcasts
    • Upcoming VMware Webcasts
    • Upcoming O'Reilly Webcasts
    • Upcoming Cisco Events
    • Upcoming Oracle Events
  4. Tech Briefing
    • Update on Kelihos Botnet and New Related Malware
    • Will Linux be locked out of Windows 8 PCs?
    • Hyper-V.nu event videos
    • Oracle announces its improved Oracle PartnerNetwork Solutions Catalog
  5. Windows Server News
    • Four cloud computing myths debunked
    • How the evolution of virtualization redefined efficient data centers
    • VDI storage tools and tips
    • Desktop audit checklist: Five steps to a successful desktop audit 
  6. WServerNews FAVE Links
    • This Week's Links We Like. Tips, Hints And Fun Stuff.
  7. WServerNews - Product of the Week
    • rDirectory Provisioning - Automatically create new accounts with the right access and resources. 

 

rDirectory Provisioning - Automatically create new accounts with the right access and resources. Every time.

When you have to manually create and update user accounts, it consumes expensive IT time. Let Namescape?s rDirectory help you increase productivity and save resources. Automate the provisioning process by pre-populating information based on user function, department, domain/OU, physical location, etc. Securely delegate user provisioning to HR or managers by allowing or denying changes to specific attributes based on the administrator?s rights. Leverage group membership and roles to allow or restrict access to specified data, so administrators maintain total control.

http://www.namescape.com/Products/rDirectory.aspx

 

Editor's Corner

From the Mailbag

Following up on last week's newsletter App Install Issues, here's a quick tip from a reader that might help if you have problems trying to uninstall an application:

Before uninstalling any app it is a good idea to make sure it is not turned off in msconfig. If it is, turn it on to enable the uninstaller to remove the line in msconfig.

Thanks very much for that suggestion. And concerning my tip that if you select some text in Word 2010 and press SHIFT+F3 repeatedly you can toggle between lowercase text, Init Cap Text, and ALL CAPS, another reader said:

Since I'm a throwback and still use Office 2003, I thought I'd try the SHIFT+F3 to see what happens and sure enough it toggles the case settings on selected text as well! MORE of these keyboard shortcuts please!

Check out the Tip of the Week section in this issue for links to where you can find lots of keyboard shortcuts for Windows 7 and Office 2010. 

And if you've found a particular keyboard shortcut that has made your life easier, tell me why at [email protected] so other readers can benefit, thanks!

Next, following up on our Lengthy Logons issue from a few weeks back, here is a more tip that might help when users complain that their laptop computers take a long time to shut down. It might be that the slow shutdown is being caused by Windows zeroing out hibernation file on the affected laptops because of the following Group Policy setting being enabled:

Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\Shutdown: Clear virtual memory pagefile

This setting is sometimes used when security is a concern as it clears the pagefile on targeted computers when they are shut down. Unfortunately a side effect of this policy seems to be that it also clears the hibernation file if there is one on the targeted computer, and that may be what is causing the user complaints you're hearing about their laptops shutting down slowly. 

Finally, here's one more tip about slow startup/logon. If you're experiencing this issue on Windows 7 or Windows Server 2008 R2, it could be due to Windows Management Instrumentation unnecessarily performing a full validation of the WMI repository, which is a time-consuming process. 

Microsoft has issued a hotfix to correct this problem:
http://www.wservernews.com/go/1328945882296

PowerShell Tips and Resources

Windows PowerShell is the way you need to go nowadays if you need to automate Windows Server configuration and management tasks. If you need to perform a task repeatedly, or on multiple servers, PowerShell can usually do it quickly and elegantly--provided you know how to use it. So this week I've included a couple of PowerShell scripts and commands that address specific configuration tasks, plus links to resources where you can find more script and learn more about how to use PowerShell in case you're a new to the game. 

But first, let's see what XKCD says about THE POSSIBLE DANGERS OF AUTOMATING CERTAIN KINDS OF TASKS:
http://www.wservernews.com/go/1328946012843

Changing the Network Binding Order

Let me begin by mentioning that the scripts included here are presented "as is" with no guarantees, so be sure to try them (and actually *anything* you read in these newsletters) in a test environment before you attempt to use them in your production environment.

OK now that that's out of the way, did you ever need to change the network binding order on a bunch of servers? PowerShell can help. Here are two scripts that Laurits Kofoed, a Senior Consultant with Microsoft Services in Denmark shared with me which he says he's used to set or change the network binding order on servers. The first one is a PowerShell script that calls the second script, a batch file that uses the Nvspbind tool to change the binding order. This is a good illustration of how you can combine different kinds of scripts together (and leverage your existing batch scripting knowledge) to achieve your goal. In other words, your solution doesn't always have to be elegant, it just needs to work.

First, here's the PowerShell script:

$NICNames = 'NOT_IN_USE','vmLAN2','VMLAN1','LiveMigration','ClusterHyperV','LAN'
foreach ($NIC in $NICNames) {
$Parameter = """$Nic"""
& .\Bind1.bat $Parameter
}

Note that the $NICNames variable above assumes that you already know the names of the NICs on the server.

Next, here's the single-line batch file Bind1.bat that's called by the above PowerShell script:

c:\Temp\NVSP\nvspbind.exe /++ %1 *

Laurits says that the /++ in this batch file sets the NIC on top, so he starts with the one that should be lowest and so on. In this way you end up with the correct binding order on the server. 

For additional information, here's a blog post from John Howard, Senior Program Manager in the Hyper-V team at Microsoft, that describes the Nvspbind tool:
http://www.wservernews.com/go/1328946191531

Finally, you can download this tool from the MSDN Archive:
http://www.wservernews.com/go/1328946204484

Creating new registry key values on remote computers

Next, have you never needed to create some new registry key values on some remote computers? I'll bet you have. Watch PowerShell come to the rescue with this script contributed by Ying Li to Rod Trent's myITforum:

$colComputers = gc c:\myworkspace\computerlist.txt
foreach ($strComputer in $colComputers)
{
#Open remote registry
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey(?LocalMachine?, $strComputer)
#Open the targeted remote registry key/subkey for read and write ($True)
$regKey= $reg.OpenSubKey("SOFTWARE\\Whatever\\General",$True)
#Create a new (string)value ??Override System Verification? and assign ?Yes? to it
$regKey.Setvalue(?Override System Verification?, ?Yes?, ?String?)
}

Here's a link to Ying Li's original post on myITforum:
http://www.wservernews.com/go/1328946307046

And here's a link to the myITforum home page:
http://www.wservernews.com/go/1328946319625

Rod's site is both an acknowledged source of helpful information about Microsoft System Center technologies and an active community of IT professionals from around the world, so be sure to check it out today.

Share your expertise!

Have you used Windows PowerShell or other scripting solutions for solving difficult automation problems for your own Windows Server environment? If so, send your scripts to me at [email protected] along with short explanations of how they work and I'll share them with our readers so others can learn from your own real-world expertise. 

PowerShell and Windows Deployment

PowerShell can also come to the rescue when you are deploying Windows in your environment. These scripting tips from The Deployment Guys illustrates this:

PowerShell Script to Create a Sysinternals Suite INF File Installer
http://www.wservernews.com/go/1328946376062

Creating a SID Mapping File with Windows PowerShell
http://www.wservernews.com/go/1328946387171

Adding and Removing Fonts with Windows PowerShell
http://www.wservernews.com/go/1328946399625

Managing Windows Libraries with PowerShell

CodePlex, Microsoft's open source project hosting web site, also has some useful PowerShell scripts. For example, here's a PowerShell module you can use to handle Windows Libraries in Windows 7:
http://www.wservernews.com/go/1328946424359

GUI interface for the AD DS Recycle Bin

A new feature of Active Directory Domain Services in Windows Server 2008 R2 is the Active Directory Recycle Bin, which makes it easy for you to recover accidentally deleted Active Directory objects using the Get-ADObject and Restore-ADObject cmdlets included in the Active Directory PowerShell module, which is also new in Windows Server 2008 R2.  So in other words, you need to know how to use PowerShell to make use of the

Active Directory Recycle Bin as this Step By Step Guide demonstrates:
http://www.wservernews.com/go/1328946471937

But while PowerShell is a terrific tool for managing Windows Server, there may be times when you'd rather just use the GUI, for example when you need to perform some simple one-off task. In the case of the Active Directory Recycle Bin, ADRecycleBin from Overall Solutions is one example of a free tool that allows administrators to quickly restore deleted Active Directory objects using the GUI:
http://www.wservernews.com/go/1328946505343

Or if you're the creative type, you could always roll your own GUI for PowerShell scripts/commands by using PowerGUI, a graphical user interface and script editor for PowerShell:
http://www.wservernews.com/go/1328946529796

For some information on where you can learn more about how to use PowerShell, see the Recommended for Learning section below.

Tip of the Week

If you need keyboard shortcuts for Microsoft products, you can try using this page from Microsoft Accessibility as your starting point:
http://www.wservernews.com/go/1328946578671

This KB article may also be helpful to you:
http://www.wservernews.com/go/1328946588968 

Recommended for Learning

A good place to start learning PowerShell is the Scripting with Windows PowerShell section of the TechNet Script Center:
http://www.wservernews.com/go/1328946621906

And here are some few good books for learning PowerShell scripting:

Learn Windows PowerShell in a Month of Lunches
http://www.wservernews.com/go/1328946647031

Automating Microsoft Windows Server 2008 R2 with Windows PowerShell 2.0
http://www.wservernews.com/go/1328946666265

Automating Active Directory Administration with Windows PowerShell 2.0
http://www.wservernews.com/go/1328946687984

Windows PowerShell Cookbook
http://www.wservernews.com/go/1328946704921

Let me know if you have any other PowerShell books you've found useful.

There are also some free PowerShell ebooks out there such as this one by Frank Koch:
http://www.wservernews.com/go/1328946742000

And be sure of course to subscribe to the Windows PowerShell Blog:
http://www.wservernews.com/go/1328946755750

Finally, if you have any questions concerning PowerShell, the best place to ask them is over on the Windows PowerShell Forum on TechNet:
http://www.wservernews.com/go/1328946770484

Quotes of the Week

"A successful life is one that is lived through understanding and pursuing one's own path, not chasing after the dreams or fulfilling the expectations of others." --Chin-Ning Chu in "Thick Face, Black Heart: The Warrior Philosophy for Conquering the Challenges of Business and Life"
http://www.wservernews.com/go/1329142445205


 

"It was drilled into my head, that happiness comes from helping people. Since day one. So now I'm just helping. It doesn't matter if they live up to it, they fight for themselves, the win is for them."  --MMA trainer Greg Jackson quoted in Sam Sheridan's "The Fighter's Mind: Inside the Mental Game"
http://www.wservernews.com/go/1328946910000

"I sat down with Marvin Lewis one day and said, 'Teach me the way a coach knows it. Show me why you watch film--why you study this tendency. Show me the breakdowns you go through.' This conversation has forever changed my life because of the knowledge side of it."  --NFL linebacker Ray Lewis in an interview in Maximum Fitness Magazine.

Be sure to forward this newsletter to a friend or colleague who might find the tips and tools in it helpful for performing their job.  And if you have feedback concerning anything in this newsletter, feel free to send it to my mailbag at [email protected]

Cheers, Mitch Tulloch 
Twitter: @mitchtulloch 
Facebook: mitchtulloch
Website: mtit.com

 

Admin Toolbox

Admin Tools We Think You Shouldn't Be Without

mPowerTools - an AD admin essential!  200+ reports, bulk import/export, scheduling, GPO/File Share Reports. Eliminate scripting! ONLY $1,499!
http://www.wservernews.com/go/1329140210874

Accident or Malicious? Learn whether suspicious activity  on Windows Servers is a result of unintentional actions?or malicious insider. View Demo.
http://www.wservernews.com/go/1329140273303

Free Service: Email Exposure Check. Find out which addresses of your organization are exposed on the Internet and are a phish-attack target:
http://www.wservernews.com/go/1329140334856

Modify network bindings from the command line with Nvspbind, for example when managing Server Core with the Hyper-V role enabled:
http://www.wservernews.com/go/1328947019515

Free tool from Overall Solutions that lets you to quickly restore deleted Active Directory objects:
http://www.wservernews.com/go/1328947030296

PowerGUI is a graphical user interface and script editor for Windows PowerShell:
http://www.wservernews.com/go/1328947039921

 

Webinars & Seminars

Conferences, Expos and Other Events

February 21-22, 2012 - Creating & Managing a Private Cloud with System Center 2012 Jump Start is a free public two-day virtual event where you can learn how to deploy, manage and maintain Microsoft?s private cloud solution using System Center 2012:
http://www.wservernews.com/go/1328947118125

March 26 - 29, 2012 - SQL Server 2012 Launch Conference and Expo at the MGM Grand in Las Vegas:
http://www.wservernews.com/go/1328947135562

April 16-20, 2012 - Microsoft Management Summit 2012 is where skilled IT professionals can meet to increase their technical expertise through hands-on training, breakout sessions and interacting with industry leaders in desktop and device management, datacenter, and cloud technologies:
http://www.wservernews.com/go/1328947165734

Upcoming Microsoft Events and Webcasts

  • February 16, 2012 - TechNet Webcast: You've Got a Cloud: Familiar Tools to Manage It (Level 300)
  • February 22, 2012 - TechNet Webcast: Hyper-V: The Base of a Private Cloud (Level 300)
  • February 22, 2012 - Business Insights Webcast: Determining the Value of Software Assurance Renewal for Your Organization (Level 100)

Sign up for these and other Microsoft events and webcasts at:
http://www.wservernews.com/go/1328947215546

Upcoming VMware Webcasts

Sign up these and other VMware webcasts at:
http://www.wservernews.com/go/1328947259312

Upcoming O'Reilly Webcasts

Sign up for these and other O'Reilly webcasts at:
http://www.wservernews.com/go/1328947303984

Upcoming Cisco Events

Browse the Cisco Corporate Events Calendar to find Cisco at events, trade shows and conferences around the world:
http://www.wservernews.com/go/1328947335000

Upcoming Oracle Events

Browse the Oracle Events page to find in-person events and live webcasts for your location:
http://www.wservernews.com/go/1328947351921

 

Tech Briefing

Update on Kelihos Botnet and New Related Malware

From the Official Microsoft Blog comes this post by Richard Domingues Boscovich , Senior Attorney with the Microsoft Digital Crimes Unit:
http://www.wservernews.com/go/1328947470000

Will Linux be locked out of Windows 8 PCs?

Ed Bott cuts through the FUD in his blog:
http://www.wservernews.com/go/1328947487500

Hyper-V.nu event videos

Learn more about new Hyper-V features in Windows Server 8 from these recorded conference sessions:
http://www.wservernews.com/go/1328947507000

Oracle announces its improved Oracle PartnerNetwork Solutions Catalog

This helpful item is from eChannelLine Daily News:
http://www.wservernews.com/go/1328947523718

 

Windows Server News

Four cloud computing myths debunked

Both enterprises and SMBs report that one of the greatest challenges of launching a cloud project is overcoming misconceptions about the cloud. False expectations often lead management in the wrong direction, hamper early planning and distort the entire project, making cloud success unlikely. There are many myths about cloud computing, but these four are the most harmful to a successful private cloud adoption.
http://www.wservernews.com/go/1328947682328

How the evolution of virtualization redefined efficient data centers

The evolution of virtualization has affected efficient data centers of all sizes. Within a blink of an eye virtualization had been transformed from a tactical technology that businesses adopted to save space, cooling, power?essentially to do more with less?into a corporate strategy that responded to business demands. Learn more about this transformation and how it will affect your organization in this expert tip.
http://www.wservernews.com/go/1328947696640

VDI storage tools and tips

Check out this expert podcast to gain insight the current state of tools for virtual desktop storage, why organizations should use them and which capabilities to look out for.
http://www.wservernews.com/go/1328947709546

Desktop audit checklist: Five steps to a successful desktop audit

The start of a new year is an opportunity to rethink, refresh and rebuild -- even when it comes to your desktop administration strategy. Part of running a tight IT ship is conducting a regular desktop audit. This desktop audit checklist has several ideas to get the ball rolling on your management strategy, asset management, software needs and more.
http://www.wservernews.com/go/1328947724078

 

WServerNews FAVE Links

This Week's Links We Like. Tips, Hints And Fun Stuff

Free 2012 PowerPoint calendars now available:
http://www.wservernews.com/go/1328947780281

Jerry Seinfeld is so excited about the new Acura NSX that he will stop at nothing to acquire the very first one:
http://www.wservernews.com/go/1328947798375

A clever invention: A bicycle that uses a flywheel to store energy:
http://www.wservernews.com/go/1328947810687

Coolest car on the block or smartest technology in the galaxy? A curious group of intergalactic creatures check out the Chevy Volt.
http://www.wservernews.com/go/1328947825562

"OK Go" drove down a two-mile stretch lined with 1,000 instruments in a Chevy Sonic for their latest music video / Super Bowl 2012 ad, which took four months to prepare and four days to shoot:
http://www.wservernews.com/go/1328947845781

 

WServerNews - Product of the Week

rDirectory Provisioning - Automatically create new accounts with the right access and resources. Every time.

When you have to manually create and update user accounts, it consumes expensive IT time. Let Namescape?s rDirectory help you increase productivity and save resources. Automate the provisioning process by pre-populating information based on user function, department, domain/OU, physical location, etc. Securely delegate user provisioning to HR or managers by allowing or denying changes to specific attributes based on the administrator?s rights. Leverage group membership and roles to allow or restrict access to specified data, so administrators maintain total control.

http://www.namescape.com/Products/rDirectory.aspx

 

 

WServerNews - Editors

Mitch Tulloch is Senior Editor of WServerNews and is a widely recognized expert on Windows administration, deployment and virtualization.  Mitch was lead author of the bestselling Windows 7 Resource Kit from Microsoft Press and has published hundreds of articles for IT pros.  Mitch is also a seven-time recipient of Microsoft's Most Valuable Professional (MVP) award for his outstanding contributions in support of the global IT pro community. Mitch owns and runs an information technology content development business based in Winnipeg, Canada. For more information see www.mtit.com

Ingrid Tulloch is Associate Editor of WServerNews and was co-author of the Microsoft Encyclopedia of Networking from Microsoft Press.  Ingrid is also Head of Research for our content development business and has co-developed university-level courses in Information Security Management for a Masters of Business Administration program.