Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Python be used as an effective script language for Windows Server environment?

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.

like image 929
Chris Hayes Avatar asked Jan 15 '11 21:01

Chris Hayes


2 Answers

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.

like image 80
Jahan Zinedine Avatar answered Oct 17 '22 09:10

Jahan Zinedine


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

like image 28
Corey Goldberg Avatar answered Oct 17 '22 07:10

Corey Goldberg