Welcome to MSDN Blogs Sign in | Join | Help

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
Published Wednesday, February 14, 2007 7:32 AM by jmanning

Attachment(s): powershell-scripts.zip

Comments

# Stringing things together - looking up the language of your TFS's sharepoint server

Wednesday, February 14, 2007 7:35 AM by James Manning's blog

[note: all my scripts are now zip'd up together on this page ] This particular script probably isn't

# why share-able functions shouldn't be in your PowerShell profile

Wednesday, February 14, 2007 10:16 PM by James Manning's blog

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

# Trace-ProcessCreation: wrapping existing code with a cmdlet

Tuesday, February 20, 2007 3:27 PM by James Manning's blog

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

# re: Various PowerShell scripts

Thursday, February 22, 2007 4:33 AM by turtl8

After compiling, how it can be used?

-newbee

# re: Various PowerShell scripts

Thursday, February 22, 2007 8:31 AM by jmanning

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

# get-memberships.ps1 - programmatically finding the groups you're a member of

Friday, March 09, 2007 10:46 AM by James Manning's blog

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

# re: Various PowerShell scripts

Friday, March 09, 2007 5:53 PM by keith_hill

I get an error executing Get-TfsStatus.ps1:

13# get-tfsstatus

Get-ItemProperty : Cannot find path 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Microsoft V

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

At C:\Bin\get-tfsstatus.ps1:39 char:38

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

# re: Various PowerShell scripts

Friday, March 09, 2007 6:08 PM by keith_hill

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.

# get-tfsserverstatus.ps1 - fetch the configuration bits of your TFS server

Saturday, March 10, 2007 12:01 PM by James Manning's blog

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

# Various PowerShell scripts

Thursday, March 29, 2007 2:05 PM by Jason Prickett's Blog

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

Anonymous comments are disabled
 
Page view tracker