[p4] PowerShell Integration

mancaus.40868864 at bloglines.com mancaus.40868864 at bloglines.com
Thu Nov 30 07:36:42 PST 2006


I agree, and use Perl/cygwin extensively too, but powershell has a bit of
a head-start to .NET/Windows developers. The .NET framework is directly invokable,
as are all WMI objects, COM objects, etc.



The OO part of the shell is quite
nice too. Pipes pipe objects rather than text.



Put together, you can do
things like the following (stops any running SQL Server instances on my notebook):



Get-WmiObject -Class Win32_Service -Computer NB1611 | ?{

  ($_.State -eq
"Running") -and ($_.Name -match "^MSSQL") } | %{ 

    $_.StopService() }

  }

}



The equivalent perl/cygwin would be difficult for a number of reasons.
I'd encourage windows developers to check it out.



Cheers,

  Blake



PS:
Apologies for the email formatting, and sounding like an MS fanboy, which
I'm not really. 



--- David Weintraub" <qazwart at gmail.com wrote:

Actually,
I've been using the Windows PowerShell for several years.

> 

> It's called
"cygwin" ;-)

> 

> I can't imagine even using a PC, let alone attempting
to administer

> them without cygwin and Perl.

> 

> I'll have to try that
PowerShell out.

> 




More information about the perforce-user mailing list