23 September 2016
23 September 2016

PSYaml: PowerShell does YAML

PSYaml is a simple PowerShell module that I’ve written that allows you to serialize PowerShell objects to “YAML Ain’t Markup Language” (YAML) documents and deserialize YAML documents to PowerShell objects. It uses Antoine Aubry’s excellent YamlDotNet library To start, you can simply load the PowerShell file and the manifest from its home on GitHub PSYaml … Read more
05 September 2016
05 September 2016

PowerShell Just Enough Administration

A major difficulty for a System Administrator who wishes to provide access for auditors, Helpdesk staff, developers and other IT people is that adminstrator roles give users more access than they need. It is too easy to make mistakes, or to make more changes than those that were signed-off. With JEA, it is possible to create role-based access control (RBAC) endpoints that define precisely what actions you’ll let your users carry out without needing a elevated, privileged administrator credentials, and which log and report all operations.… Read more
23 August 2016
23 August 2016

PowerShell Desired State Configuration: DSC Resources

Desired State Configuration (DSC) allows you to automate the way that you manage configuration data for software services as well as the environment in which these services run. DSC uses a set of built-in and custom 'resources' as the building blocks for a configuration. if you have specific requirements you may need to create the relevant resource to make the configuration happen. Nicolas Prigent provides a practical guide to DSC resources… Read more
16 June 2016
16 June 2016

PowerShell Desired State Configuration: Automating and Monitoring Pull mode

The Pull mode of Desired State Configuration (DSC) is more complicated to implement because you need to meticulously manage the MOF files and their naming conventions so as to ensure that you deploy your DSC configurations correctly. In this first article of a two-part series, Nicolas Prigent describes how you can best automate this, and then in a second part on monitoring DSC he describes techniques to help you to use the pull mode as a regular part of your admin work.… Read more
22 April 2016
22 April 2016

Unified Approach to Generating Documentation for PowerShell Cmdlets

Now, it is easy to provide professional-quality documentation for PowerShell cmdlets, and to keep it in sync when you make changes, whether they are written in PowerShell or C#. Whereas this has always been easy to do in PowerShell, it was always painful to do in C# or VB because it meant having to build your own MAML file. Michael completes his three-part series by summarising, in a wallchart, how to go about it. … Read more
17 March 2016
17 March 2016

PowerShell Desired State Configuration: LCM and Push Management Model

PowerShell's Desired State Configuration (DSC) framework depends on the Local Configuration Manager (LCM) which has a central role in a DSC architecture. It runs on all nodes that have PowerShell 4.0 or above installed in order to control the execution of DSC configurations on target nodes. Nicolas Prigent illustrates the role of the LCM in the 'Push' mode of configuring nodes.… Read more
10 February 2016
10 February 2016

PowerShell Desired State Configuration: The Basics

'Desired State Configuration (DSC) is an essential part of the configuration, management and maintenance of Windows-based servers. It allows a PowerShell script to specify the configuration of the machine using a declarative model in a simple standard way that is easy to maintain and understand. Nicolas introduces the basic DSC concepts and provides a simple example of using the 'Push' model of DSC. … Read more
01 December 2015
01 December 2015

PowerShell Day-to-Day SysAdmin Tasks: Securing Scripts

Although PowerShell is popular, for malicious intruders it represents a very attractive attack vector into your system. The obvious way of preventing this type of penetration is to detect when a script is altered. Not only must any script that is used for system or data administration be properly secured, but also any script that is used to maintain a PowerShell profile.… Read more
22 October 2015
22 October 2015

Ins and Outs of the PowerShell Pipeline

For many developers, understanding pipelining in PowerShell is like understanding reductive physicalism: you think you've just about got it, and then the brain blue-screens. Michael Sorens is inspired by his several efforts to explain pipelining on StackOverflow to attempt the definitive simple explanation for the rest of us.… Read more
14 September 2015
14 September 2015

Build Your Own Resource Monitor in a Jiffy

It's great to be able to monitor a counter or any other changing metric while engaged in development work. You'd think that the two alternatives would be using a third-party tool or hacking a PowerShell script. Well no, because there could be an existing open-source PowerShell module that would do it for you, and with a little customization could give you precisely what you need.… Read more
12 August 2015
12 August 2015

When to Quote in PowerShell

The one question about PowerShell that trips up almost everyone is about when and how to quote strings. Because PowerShell replaces the old command shell, it has to be able to work the way that it did with string parameters, but it also has to behave like a .NET scripting language to replace VBA. PowerShell grapples with this apparent contradiction, and manages to square the circle. Michael Sorens explains the how and when of PowerShell quoting.… Read more
01 July 2015
01 July 2015

PowerShell Day-to-Day Admin Tasks: Monitoring Performance

By reading performance counters from services such as SQL Server or Exchange, you can get a wealth of performance information. By automating the process of gathering and storing appropriate counters, you can routinely check a range of devices quickly using visual tools such as PerfMon. By then creating your own counters, you can add counter-based metrics to anything that can be measured programmatically, such as services, applications, processes such as ETL, or deployments. … Read more
25 June 2015
25 June 2015

The Poster of the Plethora of PowerShell Pitfalls

One of the downsides of learning a new computer language is that transfer of training doesn't always work to your advantage. In fact, the habits you picked up in the past may now cause confusion. In this poster or wall-chart for long walls, Michael Sorens selects the thirty-six most common causes of confusion for anyone getting to grips with PowerShell. Forewarned is forearmed.… Read more
28 May 2015
28 May 2015

PowerShell Day-to-Day Admin Tasks: WMI, CIM and PSWA

WMI (Windows Management Instrumentation) is the basic way of querying and changing basic information about any windows server, including SQL Server or Exchange Server. It provides a logical structure and representation of systems and services that are hosted on the server and is essential for anyone who is keen to automate routine monitoring and administration work via PowerShell, especially where many servers are involved in the task.… Read more