Various PowerShell scripts


This page just gives me a place to keep a most-recent-copy of my various PowerShell scripts, mostly related to TFS.  This makes it easier for people that want to use them than having to copy-paste from lots of different blog posts.  Note that since some of the scripts call other scripts in this collection, you'll want whatever dir you put them in to be in your path so those calls will resolve correctly.

History:

  • 2007-02-14: initial posting
  • 2007-02-20: remove backup files, add JManningSnapIn dir with 2 cmdlets
  • 2007-02-27: add AUTH property to get-tfs for easier access to IAuthorizationService
  • 2007-04-04:
    • remove cmdlets since they'll likely become power tools
    • update check-wss to use OM
    • add various scripts posted on the blog
      • change-websiteid
      • connect-webservice (slightly modifed version of Lee's)
      • convertto-readabledisplayname
      • get-db
      • get-hash
      • get-hashes
      • get-iprestrictions
      • get-memberships
      • get-sqlrsinfo
      • get-teamprojectacls
      • get-tfsserverstatus (actually a rename and edit of get-tfsstatus)
      • wmiexplorer (MoW's version)
    • update translate-changeset to use connect-webservice
    • beef up run-query to handle both scalar and sets of data
    • fix trap construction when normalize-tfserverurl calls get-workspace
    • change normalize-tfserverurl param to optional by figuring out server based on if the current dir is mapped
    • refactor out new-sqlconnectionfromconnectionstring so places with a connection string can get a connection from that

powershell-scripts.zip

Comments (10)
  1. [note: all my scripts are now zip’d up together on this page ] This particular script probably isn’t

  2. <imho> I cringe when I come across web sites or blog posts that start out with something like "shove

  3. I was spamming asking around earlier this week about how to monitor process creation in windows. I was

  4. turtl8 says:

    After compiling, how it can be used?

    -newbee

  5. MSDN Archive says:

    Good quesiton!

    installutil the dll, add-pssnapin in new instance of powershell.

    more details at https://blogs.msdn.com/jmanning/archive/2007/02/07/simplest-tfs-cmdlet-history-of-a-local-file.aspx

  6. Forum thread was asking for this (admittedly, in C#). Since it’s less typing in PowerShell, that’s what

  7. keith_hill says:

    I get an error executing Get-TfsStatus.ps1:

    13# get-tfsstatus

    Get-ItemProperty : Cannot find path ‘HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstallMicrosoft V

    isual Studio 2005 Team Foundation Server (services) – ENU’ because it does not exist.

    At C:Binget-tfsstatus.ps1:39 char:38

    This stuff looks really cool BTW.  I’m glad to see a PowerShell junkie on the TFS team.

  8. keith_hill says:

    Ya know it appears that the Get-TfsStatus.ps1 script is meant to run on a TF server.  Is that correct?  I really need it to run on the client side.

  9. It’s currently in the collection as get-tfsstatus.ps1 which has caused confusion since it doesn’t act

  10. <Copying this post almost directly from James , but the scripts are my own. See his blog for more

Comments are closed.

Skip to main content