Welcome to MSDN Blogs Sign in | Join | Help

February 2007 - Posts

Windows Automated Installation Kit (AIK)

It's great to see powerful tools be made publicly available; winpe and imagex are powerful tools I've been using for some time to deploy systems and recover from hardware & software failures. Windows Automated Installation Kit (AIK) Overview The Windows
Posted by mwilbur | 1 Comments

Updating a DataSet with Powershell and saving changes back to SQL

This example uses the AdventureWorks sample database. # get the dataset PS C:\demo> $ds = .\get-dataset.ps1 "select * from Production.ProductModel" -db adventureworks # write out xml from the instructions column into seperate files PS C:\demo> $ds
Posted by mwilbur | 1 Comments

Capturing SQL Generated by SMO in Powershell

The following example uses the get-sqlserver.ps1 script in my search path. get-sqlserver.ps1: param ( $server = "." ) $null = [reflection.assembly]::loadwithpartialname( "microsoft.sqlserver.smo" ) new-object Microsoft.SqlServer.Management.Smo.Server
Posted by mwilbur | 0 Comments

EventTriggers

This could be usefull; I always like knowing about obscure commands that are on every box I work with. eventtriggers [ .exe ] /create [ /s Computer [ /u Domain \ User [ /p Password ]]] /tr TriggerName [ /l [ APPLICATION ] [ SYSTEM ] [ SECURITY ] [ "DNS
Posted by mwilbur | 0 Comments

Connect to and Shadow the Console Session with Terminal Services

This KB article shows how you have two separate TS sessions connected to the console: How to Connect to and Shadow the Console Session with Windows Server 2003 Terminal Services
Posted by mwilbur | 0 Comments

Remote Desktop shortcut keys

Remote Desktop has some really handy shortcuts that are documented right there in the help file: Shortcut key Description ALT+PAGE UP Switches between programs from left to right. ALT+PAGE DOWN Switches between programs from right to left. ALT+INSERT
Posted by mwilbur | 0 Comments

Powershell script that can schedule itself to run later

From time to time I find it useful to schedule tasks to run on my machine. I often realize that many people are unaware that windows 2003 has a built in task scheduler; and even more of a rarity for them to be aware it can be managed via the command line.
Posted by mwilbur | 1 Comments
Filed under:

Powershell 1 liner: Key Value pairs from text file to hashtable

Example Problem: You have a text file that contains key value pair and you want to use them as a hash table in powershell. Values.txt: key1=value1 key2=value2 key3=value42 One way to do it: PS C:\temp> gc values.txt | %{$h = @{}} {if ($_ -match "(.*)=(.*)")
Posted by mwilbur | 0 Comments
Filed under:
 
Page view tracker