Thomas Lee's PowerShell Scripts

  • Install-RMAzureVmCert

    Function Install - WinRMAzureVmCert { < # . SYNOPSIS Downloads and installs the certificate created or initially uploaded during creation of a Windows based Windows Azure Virtual Machine . . DESCRIPTION Downloads and installs the certificate created ( or uploaded ) during the creation of a Windows based Windows Azure Virtual Machine . Running This function obtains and installs the certificate into...
  • New-HttpVmEndpoint.ps1

    Function New - HttpVmEndpoint { < # SYNOPSIS This script defines a function to add an HTTP endpoint to an Azure VM . . DESCRIPTION This script uses the Azure module to change the VM instance size . . NOTES File Name : New - HttpVmEndpoint . ps1 Author : Thomas Lee - tfl@psp . co . uk Requires : PowerShell Version 3.0 , Azure module Tested : PowerShell Version 5 . LINK This script posted to : http...
  • AzureVM.Format.Ps1xml

    <!--    Description       This file contains display XML for the object returned from       Get-AzureVM. It's purpose is to provide better (default) output       from Get-AzureVm.    Written by       Thomas Lee ( tfl@psp.co.uk    Copyright:     ...
  • Measure-TypeAccelerator.ps1

    < # . SYNOPSIS This function 'measures' ( counts ) the number of Type Accelerators on your system . . DESCRIPTION This function counts the number of type accelerators are on your systems and returns that number . . NOTES File Name : Measure - TypeAccelerator . ps1 Author : Thomas Lee - tfl@psp . co . uk Requires : Version 3 . LINK Script Repository http : //www.pshscripts.blogspot.com ....
  • Remove-TypeAccelerator

    < # . SYNOPSIS This script removes a type accelerator from your system . DESCRIPTION This script removes a NEW TA from your system . . NOTES File Name : Remove - TypeAccelerator . ps1 Author : Thomas Lee - tfl@psp . co . uk Requires : Version 3 . LINK Script Repository http : //www.pshscripts.blogspot.com . Example Psh [ C : \foo ] > Remove - TypeAccelerator tfl Alias [ tfl ] removed # > ###...
  • New-TypeAccelerator.ps1

    < # . SYNOPSIS This script creates a new type accelerator on your system . DESCRIPTION This script adds a NEW TA to your system . . NOTES File Name : New - TypeAccelerator . ps1 Author : Thomas Lee - tfl@psp . co . uk Requires : Version 3 . LINK Script Repository http : //www.pshscripts.blogspot.com . Example Psh [ C : \foo ] > New - TypeAccelerator tfl system . int32 Alias [ tfl ] added for...
  • Count-TypeAccelerator.ps1

    < # . SYNOPSIS This script counts the number of Type Accelerators on your system . . DESCRIPTION This script creates a function that counts the number of TAs in your systems and returns that number . . NOTES File Name : Count - TypeAccelerator . ps1 Author : Thomas Lee - tfl@psp . co . uk Requires : Version 3 . LINK Script Repository http : //www.pshscripts.blogspot.com . Example Psh [ C : \foo...
  • Get-Stack1.ps1

    < # . SYNOPSIS MSDN sample showing push and other stack processing using PowerShell . DESCRIPTION This script creates a script then performs stack operations . . NOTES File Name : Get - Stack1 . p1 Author : Thomas Lee - tfl@psp . co . uk Requires : PowerShell V2 . LINK http : //www.pshscripts.blogspot.com . EXAMPLE PSH [ C : \foo ] : . \get - stack1 . ps1' Stack at start : fox quick The ( Pop...
  • Zip-Pshscripts3.ps1

    #Requires –Version 5.0 # # . Synopsis # Creates a zip file of PowerShell scripts # . Description # The script creates a zip file containing all the files , # recursing through the top level PowerShell Script Library folder . # # . Notes # This script require PowerShell V5 for the zip file cmdlets ! # Author - Thomas Lee - tfl@psp . co . uk # # . Example # PS [ c : \foo ] > . \Zip - PSHScripts3 Read...
  • Getting Shutdown Information

    All PowerShell Versions Windows logs all shutdown events in its System event log. From there, you can extract and analyze the information. Here is a function that looks for the appropriate event log entries, reads the relevant information from the ReplacementStrings...
  • Copying Command History...

    All PowerShell Versions If you played with PowerShell and suddenly realize that you would actually like to keep the commands you played with, try this simple one-liner: ( Get-History ) . CommandLine | clip It copies all commands from your command history...
  • Searching Files with Regular Expressions

    All PowerShell Versions Get-ChildItem does not support advanced file filtering. While you can use simple wildcards, you cannot use regular expressions. To work around this, add a cmdlet filter and use the operator -match. This example will find all files...
  • Get-ISEShortcut.ps1

    < #   .Synopsis     Gets all the keyboard short cuts.   .DESCRIPTION     This function gets a set of GUI resources and      gets those that are kb related. The function sorts     the resources to get a better output.  .EXAMPLE     An exercise left to the reader  .NOTES     Also...
  • Show-Message.ps1

    < #   .SYNOPSIS      This script creates a function to display a message      in a message block, then demonstrates its usage  .DESCRIPTION      This script used Windows Forms to put up a message      box containing text and a window title passed as       parameters  .NOTES ...
  • Show-TimeSpanFormatting.ps1

    < #   .SYNOPSIS       This script demonstrates formatting System.TimeSpan objects      Using PowerShell   .DESCRIPTION       This script re-writes some MSDN Samples that demonstrate       timespan formatting - the original article lacks PowerShell      Examples. And sadly...
1 2 3 4 5 Next > ... Last »
Copyright 2012 PowerShell.com. All rights reserved.