Show-Properties


posted by Tobias
10-01-2010

Downloads: 307
File size: 414 B
Views: 1,422

Embed
Show-Properties
  1. function Show-Properties
  2. param
  3. [Parameter(ValueFromPipelineByPropertyName=$true)] 
  4. [Alias('LinkPath')] 
  5. [Alias('FileName')] 
  6.  
  7. $Path 
  8. begin { 
  9.   $shell = New-Object -ComObject Shell.Application 
  10.  
  11. process { 
  12.   $parent = Split-Path $Path 
  13.   $child = Split-Path $Path -Leaf 
  14.  
  15.   $folder = $shell.NameSpace($parent
  16.   $file = $folder.ParseName($child
  17.   $file.InvokeVerb('Properties'
Opens the property page for any file specified. Sample for a pipeline-aware function (filter)
Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.