Windows 7 – Deployment Deep Dive – FREE!

I know I said it before but hurry now and register! 

Absolutely FREE event on Windows 7 and Deployment is being held NEXT Monday (February 8th 2010) at Microsoft Mississauga!

Details are as follows! If you’re interested Click HERE to get directly to the Microsoft site to register!  Just bring your interest and passion!

———————————————————-

Deployment Deep Dive on Windows 7 Community Tour-Mississauga

Event ID: 1032436872

 

February 8, 2010 6:30 PM – February 8, 2010 8:30 PM Eastern Time (US & Canada)
Welcome Time: 6:00 PM

Microsoft Canada Headquarters

MPR A/B/C
1950 Meadowvale Boulevard
Mississauga Ontario L5N 8L9
Canada

Event Overview

Are you running Windows XP?  Are you feeling the pressure of creating a deployment plan? Have no fear!  Leveraging learning’s from two Windows 7 early adopters this session will give you the skills you need to proceed with your own deployment.  The session will focus on free Windows 7 deployment planning and deployment tools that customize operating system packages and automate deployment planning and network deployments seamlessly. We will dive right into:        

  • How to use the Microsoft Assessment and Planning (MAP) tool to identify your current hardware and application inventory.
  • How to use the Windows Automated Install Kit (WAIK) to build a customized image for your organization.
  • How to use the Microsoft Deployment Toolkit (MDT) to build, deploy and maintain Windows installation images.
  • How to migrate the end users profile from their current installation to the Windows 7 installation using the User State Migration Toolkit (USMT).
  • How to integrate MDT and Windows Deployment Services (WDS) to perform Lite Touch installations of Windows 7.

Finally we will look at how we can leverage the various tools to solve any application compatibility issues you might encounter.  We will look at how you can overcome common obstacles using the Application Compatibility Toolkit (ACT), or larger obstacles using Windows XP Mode and Microsoft Enterprise Desktop Virtualization (MED-V) and even how you can leverage Application Virtualization (App-V) to streamline application deployment and ensure all your applications work!

Please note: there is no cost to attend this event.

Powershell – List SQL Server Databases

Powershell

Oh my love affair with Powershell gets overwhelming some days.  It really is a troublesome little mistress.

For every time somebody comes up to me and asks “Can this be done in Powershell?” the answer is almost invariably “YES!”

Sometimes the answer takes a bit of thought and bit of effort.

But what I love, is once you design the answer it is almost ALWAYS Neutral of your Infrastructure or Development Environment!  You can take those solutions with you anywhere!

Today we had a question.  “Can’t we just query the SQL servers to see what instances we have?”

I’m not an SQL guy.  I can’t even pretend to be.  I can install it, I can navigate it, I can drop tables and make messes.

But I’m not a SQL guru.

But I DO know that SQL server 2008 Management tools has a Powershell Snapin.  It sits INSIDE the Management Studio but it’s there.

It’s a very Dead simple command to for Powershell people.  Just use the SQL Provider and good old “GET-CHILDITEM”

Yup.

GET-CHILDITEM SQLSERVER:SQLSERVERNAMEDEFAULTDatabases

 

Where “SERVERNAME” is the name of an SQL server.  And you can navigate to the different servers this way to by just changing the name.

Now the problem I ran into is if you don’t have credentials, you can’t connect (DUH).  I couldn’t find the answer yet on how to pass alternate credential in the SQLProvider in Powershell.  But I DID discover that the database list on a SQLServer (like a LOT of information in Windows) can be obtained by good old WMI.

 

So the alternate method you can ALSO use to show the Databases on a SQL Server is run a GET-WMIOBJECT against “win32-perfformatteddata-mssqlserver-sqlserverdatabases” (*Yes, it’s a mouthful*)

 

GET-WMIOBJECT win32-perfformatteddata-mssqlserver-sqlserverdatabases

 

Need the list from a foreign computer?  Just drop in the IP address or resolvable name!

 

GET-WMIOBJECT win32-perfformatteddata-mssqlserver-sqlserverdatabases –computer SERVERNAME

 

And of course like everything else in Powershell, passing credentials will validate you if necessary. 

 

GET-WMIOBJECT win32-perfformatteddata-mssqlserver-sqlserverdatabases –computer SERVERNAME –credential DOMAINUsername

 

Now you’d like that to be readable, because WMI usually gives a LOT of information we don’t need, so just format the output to a table and pick what you need.

 

GET-WMIOBJECT win32-perfformatteddata-mssqlserver-sqlserverdatabases –computer SERVERNAME –credential DOMAINUsername | format-table Name

See?  And I didn’t even trip on a single “Table” in the “process”.

Yes my worst Pun of the day.

 

Powershell, Enjoy the good life

Sean
The Energized Tech

Windows Vista and Windows 7 – Deleting old profiles and clean up

Sometimes we ITPros do blunt and stupid things.   Sometimes we do them without thinking.

There and RIGHT and WRONG ways to delete USERProfile data on a workstation.

In the Pre Vista/7 days you could just go in to “Documents and Settings” and DELETE the old user data and all was good.  DONE!

Found something out in Vista and Windows 7.

*AHEM* – Don’t do that.  Or *IF* you do make sure you delete the reference of the user from the registry.  There is a spot in Windows 7 and Vista that says “User Profile for JOHNSMITH is HERE!”

If you do it the old way, just look for an entry under

HKEY-LOCAL-MACHINESoftwareMicrosoftWindow NTCurrentVersionProfileList

You’ll find a series of keys, under each one is an entry called “ProfileImagePath”. That will contain the path on the hard drive of where the User profile was.  If you do NOT delete that key you’ll find out the hard way that IF “JOHNSMITH” ever tries to log into that machine again?  He’ll keep getting logged in with a TEMP profile, which is … IRRITATING!

OR If you’re really “Lazy” (AHEM EFFICIENT) you can run a Script with Powershell like THIS to get rid of the offending key. 🙂

—– Profile Cleaner —–

$OLDUSERID=’John.Smith’
$REGPROF=’REGISTRY::HKLMSoftwareMicrosoftWindows NT CurrentVersionProfileList’
$PROFLIST=GET-CHILDITEM $REGPROF
FOREACH ( $ITEM in $PROFLIST )

{

$userid=(get-itemproperty registry::$item).ProfileImagePath
if ($userid -like ‘*sean.kearney*’) { $userid; remove-item registry::$item -whatif }

}

—— Profile Cleaner —–

 

Ok that’s not such a lazy script but I just couldn’t RESIST using Powershell to do something 🙂

Cheers all and clean up your mess the right way

Sean
the Energized Tech