harleygreen.com
.net development
RSS-2.0

Category Powershell

  • Using Powershell to get the strong name of an assembly

     

    Here's a short powershell script to get the strong name of an assembly:

     
    1. function Get-AssemblyName {  
    2. param($file)  
    3. $path = Resolve-Path $file  
    4. [System.Reflection.AssemblyName]::GetAssemblyName($path).FullName  
    5. }  

    If you add this to your profile, you can set up an external tool in Visual Studio to run this against the current project:

     


     

     

     


    12/3/2008 2:33:00 PM Published by Harley Green Category Powershell Comments 0
  • PowerText

    PowerText is a powershell snapin for file processing.
    The initial release has a single cmdlet - Import-DelimitedValues for importing character delimited values, available @ www.harleygreen.com/7/section.aspx/download/3

    Current cmdlets include:

    Import-DelimitedValues: Replacement for the Import-Csv cmdlet, providing the ability to specify the delimiter.

    This is an initial release, and is offered under the Apache 2.0 licence.

    Source code to follow shortly.

    Comments / criticism / suggestions are all welcome.

    Thanks
    Harley
    5/18/2008 11:08:00 PM Published by admin Category Powershell Comments 0
  • PowerQueue

    PowerQueue is a powershell snapin for accessing MSMQ messages and queues, available @ www.harleygreen.com/7/section.aspx/download/2

    Current cmdlets include:

    Clear-Queue: Purges all messages from a queue
    Get-Queue: Gets queues matching input parameters
    New-Queue: Creates a new queue
    Receive-Message: Reads / Peeks at messages in a queue
    Send-Message: adds a message to a queue
    Test-Queue: check if a queue exists

    This is an initial release, and is offered under the Apache 2.0 licence.

    Source code to follow shortly.
    update: These cmdlets have been included in Powershell Community Extentions - the source is available from codeplex @ http://www.codeplex.com/PowerShellCX

    Comments / criticism / suggestions are all welcome.

    Thanks
    Harley
    4/27/2008 11:39:00 PM Published by admin Category Powershell Comments 0
  • PowerSql

    PowerSql is a simple powershell snapin for easy execution of sql commands. There are 2 flavors - OleDb and SqlServer specific commands.

    The current cmdlets include:
    Get-SqlData - returns strongly typed objects
    Get-OleDbData - returns strongly typed objects
    Get-SqlDataSet
    Get-OleDbDataSet
    Invoke-SqlCommand - returns number of rows affected
    Invoke-OleDbCommand - returns number of rows affected

    update: These cmdlets have been included in Powershell Community Extentions - the source is available from codeplex @ http://www.codeplex.com/PowerShellCX
    2/4/2008 12:00:00 AM Published by admin Category Powershell Comments 0
Archive