Monthly Archives: June 2006

Calling a Web Service from PowerShell

Before starting this you need to setup PS environment to enable the Visual Studio 2005 tools.  Copy the following into a file called something like vs80vars.ps1:   $env:VSINSTALLDIR="$env:ProgramFiles\Microsoft Visual Studio 8"$env:VCINSTALLDIR="$env:ProgramFiles\Microsoft Visual Studio 8\VC"$env:DevEnvDir="$env:VSINSTALLDIR\Common7\IDE"$env:FrameworkSDKDir="$env:VSINSTALLDIR\SDK\v2.0" $FrameworkPath=$([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())$env:FrameworkDir=$(split-path $FrameworkPath -Parent)$env:FrameworkVersion=$(split-path $FrameworkPath -Leaf) $env:PATH="$env:VSINSTALLDIR\Common7\IDE;$env:VCINSTALLDIR\BIN;$env:VSINSTALLDIR\Common7\Tools;$env:VSINSTALLDIR\Common7\Tools\bin;$env:VCINSTALLDIR\PlatformSDK\bin;$env:FrameworkSDKDir\bin;$env:FrameworkDir\$env:FrameworkVersion;$env:VCINSTALLDIR\VCPackages;$env:PATH"$env:INCLUDE="$env:VCINSTALLDIR\ATLMFC\INCLUDE;$env:VCINSTALLDIR\INCLUDE;$env:VCINSTALLDIR\PlatformSDK\include;$env:FrameworkSDKDir\include;$env:INCLUDE"$env:LIB="$env:VCINSTALLDIR\ATLMFC\LIB;$env:VCINSTALLDIR\LIB;$env:VCINSTALLDIR\PlatformSDK\lib;$env:FrameworkSDKDir\lib;$env:LIB"$env:LIBPATH="$FrameworkPath;$env:VCINSTALLDIR\ATLMFC\LIB" … Continue reading

Posted in PowerShell | 7 Comments

FINDSTR Equivalent in PowerShell

I ran across this blog post by Ian Griffiths called Learning PowerShell: FINDSTR Equivalent which motivated me to come up with my own flavor of this sort of utility.  The great thing about PowerShell is that you can take these … Continue reading

Posted in PowerShell | Leave a comment

Creating and Using a Configuration File for Your PowerShell Scripts

.NET has this nice and easy ability to load application configuration information from an XML config file associated with the application.  Unfortunately there isn’t a way to put config info in a config file associated with a DLL e.g. Acme.dll.config.  The only way to get … Continue reading

Posted in PowerShell | 6 Comments