• Mike Wilbur's Blog

    Remote Desktop shortcut keys

    • 0 Comments
    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...
  • Mike Wilbur's Blog

    Renaming a network connection with netsh

    • 1 Comments
    Example: netsh interface set interface name="Local Area Connection" newname="ExampleLan"
  • Mike Wilbur's Blog

    Powershell script that can schedule itself to run later

    • 1 Comments
    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...
  • Mike Wilbur's Blog

    Updating a DataSet with Powershell and saving changes back to SQL

    • 1 Comments
    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...
  • Mike Wilbur's Blog

    Powershell Template Engine

    • 0 Comments
    A template engine that allows you to have powershell expressions in your templates is a very powerful thing: http://weblogs.asp.net/soever/archive/2006/12/31/a-templating-engine-using-powershell-expressions.aspx Example Input: Multi Line Expression: ...
  • Mike Wilbur's Blog

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

    • 0 Comments
    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...
  • Mike Wilbur's Blog

    get-SHA256

    • 1 Comments
    Get the SHA256 hash in one line of powershell: function get-sha256 { param($file);[system.bitconverter]::tostring([System.Security.Cryptography.sha256]::create().computehash([system.io.file]::openread((resolve-path $file)))) -replace "-","" }
  • Mike Wilbur's Blog

    Managing Performance Counters via Command Line

    • 0 Comments
    When it comes to scripting the setup of performance counters Logman is your friend; and Relog comes in really handy for converting a binary log to SQL log.
  • Mike Wilbur's Blog

    Windows Automated Installation Kit (AIK)

    • 1 Comments
    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...
  • Mike Wilbur's Blog

    Capturing SQL Generated by SMO in Powershell

    • 0 Comments
    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...
  • Mike Wilbur's Blog

    Connect to and Shadow the Console Session with Terminal Services

    • 0 Comments
    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
  • Mike Wilbur's Blog

    EventTriggers

    • 0 Comments
    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...
  • Mike Wilbur's Blog

    get-datatable.ps1

    • 0 Comments
    get-datatable.ps1 is an improvement on the get-dataset.ps1 from an earlier post . Instead of returning a dataset it returns a DataTable; and a UpdateSql method is added to the object returned, so you don't need a separate script to send the changes back...
Page 1 of 1 (13 items)