Browse by Tags

All Tags » PowerShell (RSS)

PowerShell: get your external IP address by svdoever

Needed this in a script to automatically add a firewall rule to my Azure SQL server:   $externalIP = (New-Object net.webclient).downloadstring(" http://checkip.dyndns.com") -replace "[^\d\.]"
Filed under: ,

PowerShell: script to show detailed information on a set of assemblies by svdoever

To get some insight in your assemblies you can use the script below. It gets all information out that I required, but you can extend it if you need for example all assemblies an assembly depends on. One thing that was new for we was that I needed functions...

PowerShell: PrimalForms and the TFS source control provider by svdoever

I’m using PrimalForms 2011 for designing PowerShell front-ends and editing some PowerShell. Code is under source control (TFS), and PrimalForms has a Source Control tab. Initially the “Providers” section was empty, after installing Team Foundation Server...
Filed under:

PowerShell: dot source scripts into your module by svdoever

You can create wrapper modules around existing library script files you “dot source” ‘d into your PowerShell 1.0 code by dot sourcing them into your module. Problem is that from a module your current location is the location of the script that first imported...

Taming the VSX beast from PowerShell by svdoever

Using VSX from PowerShell is not always a pleasant experience. Most stuff in VSX is still good old COM the System.__ComObject types are flying around. Everything can be casted to everything (for example EnvDTE to EnvDTE2) if you are in C#, but PowerShell...

Powershell: Finding items in a Visual Studio project by svdoever

In the Macaw Solutions Factory we execute a lot of PowerShell code in the context of Visual Studio, meaning that we can access the Visual Studio object model directly from our PowerShell code. There is a great add-in for Visual Studio that provides you...

PowerShell internal functions by svdoever

Working with PowerShell for years already, never knew that this would work! Internal functions in PowerShell (they probably have a better name): function x {     function y     {        ...
Filed under:

Returning an exit code from a PowerShell script by svdoever

Returning an exit code from a PowerShell script seems easy… but it isn’t that obvious. In this blog post I will show you an approach that works for PowerShell scripts that can be called from both PowerShell and batch scripts, where the command to be executed...
Filed under: ,

Powershell output capturing and text wrapping… again… by svdoever

A while a go I wrote a post “ Powershell output capturing and text wrapping: strange quirks... solved! ” on preventing output wrapping in PowerShell when capturing the output. In this article I wrote that I used the following way to capture the output...
Filed under: ,

Debugging executing program from PowerShell using EchoArgs.exe by svdoever

Sometimes you pull you hairs out because the execution of a command just does not seem to work the way you want from PowerShell. A good example of this is the following case: Given a folder on the filesystem, I want to determine if the folder is under...
Filed under: ,
More Posts Next page »