Question

I'm currently working on a strategy for managing multiple Windows Server 2003 to 2008 running SQL Server 2000 - 2008 and I want/need a unified scripting platform for automating tasks. I'm becoming a big fan of Python and as such I'd like to know if Python has been used effectively as a scripting language for administering a various set of Windows Server installations with various SQL Server installations running various jobs. I'm familiar with IronPython which executes against the .Net framework but I'm unsure what syntax version of Python IronPython uses.

EDIT: FYI: I am familiar with Powershell but the more I know about it and it's syntax the more I don't like it.

EDIT: Please, if you can, I'd like to know of your success story of implementing Python as a script solution on Windows.

Was it helpful?

Solution

Notwithstanding my love of Python, I think PowerShell fits more.

From Wikipedia:

Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both local and remote Windows systems.

OTHER TIPS

2 essentials for working on Windows with Python are:

Tim Golden's WMI module:
* http://timgolden.me.uk/python/wmi/cookbook.html

Mark Hammond's PyWin32 package:
* http://docs.activestate.com/activepython/2.4/pywin32/PyWin32.HTML

I'm not sure about Windows, but Python is used a lot in Linux for administrative scripts and it is way better that a native Windows shell. And I think that Python is quite good for your tasks.

As another option you can take a look at cygwin and bash.

I'm unsure what syntax version of Python IronPython uses.

IronPython's syntax is currently at the same level as Python 2.6.

IronPython integrates very well with .NET and COM and IMO, fits the programmer mindset better than Powershell (I'm not really a fan of the Powershell syntax). However, Powershell is certainly the safer option because it's actively supported by Microsoft.

I've never done complex Windows system administration in Python myself (not involving SQL server anyway), but i think you could take a look at the winsys project.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top