I just installed Powershell and started playing with. Of course being a developer first I wanted to check some scripts which could help me out to play with command line based makefiles and scripts which can be easily implemented using PS1.

First of all I recommend of course converting cmd.exe based batch file which sets up the environment.

Script coming with .NET Framework 2.0 converted to Powershell looks like:

<script>
## .NET Framework 2.0 launch script for powershell hosted command line operations
## ####################################################################

$env:path = $env:path + ";C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin;C:\Windows\Microsoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual Studio 8\VC\bin;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE;C:\Program Files\Microsoft Visual Studio 8\VC\vcpackages";
## ######################################
$env:lib = "C:\Program Files\Microsoft Visual Studio 8\VC\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Lib;" + $env:lib
## ######################################
$env:include = ";C:\Program Files\Microsoft Visual Studio 8\VC\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include;" + $env:include;
## ######################################
$env:NetSamplePath = "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0"
$env:VCBUILD_DEFAULT_CFG= "Debug^|Win32"
$env:VCBUILD_DEFAULT_OPTIONS= "/useenv"
## ######################################
write-host "Setting environment to use Microsoft .NET Framework v2.0 SDK tools."
write-host "For a list of SDK tools, see the 'StartTools.htm' file in the bin folder."
## ######################################
</script>