Chapter 10. Windows system administration with IronPython

 

This chapter covers

  • Shell scripting and Python libraries
  • Windows Management Instrumentation from .NET
  • Remote administration
  • Hosting PowerShell from IronPython
  • Hosting IronPython from PowerShell

Because Python is interpreted, it’s often referred to as a scripting language. The Python community regards this term as slightly derogatory because it seems to imply that Python is suited to only simple scripting tasks rather than larger applications. Having said that, Python does make a great scripting language. Scripts can be kept as text source files, common tasks can be achieved with very little code, and you don’t need to use classes or even functions if they aren’t appropriate for the job at hand. The greatest advantage of Python for system administration tasks is that, as a full programming language, it’s easy to migrate what starts as a simple script into a full application.

In this chapter, we look at system administration with IronPython, taking advantage of the features that Python and the .NET framework provide. The aspects of .NET that we use are Windows Management Instrumentation (WMI) and PowerShell, both of which are frameworks aimed particularly at the systems administrator.

10.1. System administration with Python

10.2. WMI and the System.Management assembly

10.3. PowerShell and IronPython

10.4. Summary

sitemap