PowerShell

Powershell related code snippets

SCCM Application Objects - Enhanced Registry Detection

Over the years I've posted a number of atricles related to using PowerShell with SCCM.  The most read of these was about creating SCCM Applications with Enhanced Detection methods - specifically for File Based Detection.  A number of people have asked for an example of the same script using Registry based detection for installed applications.

Not to go over old ground - the earlier blogs that may be of interest are found here:

PowerShell DSC - using an IP address to Configure a Workgroup Machine

 

PowerShell’s Desired State Configuration is becoming a core component of Windows and is included with the installation of PowerShell 5.

Earlier I wrote about enabling WinRM using a self-signed certificate (http://www.laurierhodes.info/?q=node/115).   Use those instructions to configure WinRM on a newly built machine.

Using Azure Automation with only REST API’s

Azure Automation is the next step in Microsoft’s Orchestration path.  Using predefined workflows / with REST/Odata/WebAPI has been a core component of Orchestrator, Service Management Automation and the Cloud based Azure Automation.

Hardware Reporting with PowerShell

WMI is easy to use and great for querying information about remote machines.  It’s the obvious choice for reporting on hardware usage – especially for scoping EC2 instances.  What is a little more interesting is using the retrieved information to construct a report.

Enabling Windows Remote Management (WinRM) with HTTPS

Windows Remote Management is a core technology for the remote management and configuration of Windows machines.  WinRM is essential for automating complex Azure and AWS tasks.  This guide will outline how to establish WinRM using SSH and a self-signed certificate.  A certificate issued from a Certificate Authority would be preferable but for the purpose of establishing a test environment, the steps below are enough to get the technology working.

This demonstration is in three parts.

Calling PowerShell Modules with the REST / ODATA IIS Server extension (Example 2 - SSH)

To demonstrate how powerful the IIS Odata extension for PowerShell is, I’ve tweaked the SSH PowerShell module that I published previously for use with Azure Pack.  By doing so, as long as I can connect to my Windows IIS web server, I can relay SSH commands from any other physical environment.

You will need to have setup the Odata IIS server extension as described in http://www.laurierhodes.info/?q=node/111

Calling PowerShell Modules with REST / ODATA API

For a long time now, Windows Server has come with a feature called the “Management OData IIS Server Extension”.  As technology increasingly moves toward cloud computing and Microsoft technology is congealing around PowerShell, the power of this little known feature could hardly be overstated.  Built-in to Windows is the ability to run any PowerShell module remotely via a REST / ODATA API call. 

SSH Module for Service Management Automation

This module is reworked from the version posted by Eamon O’Reily on the technet gallery.

https://gallery.technet.microsoft.com/scriptcenter/Sample-PowerShell-module-8d961a1c/view/Discussions#content

An "Offline" Web Platform Installer

Microsoft’s Web Platform installer provides the ability of installing web based components onto Windows Platforms.  The technology is simple to use and works well when a machine has access to the internet.  When the machine being installed don’t have access to the internet the installer becomes a problem.

PowerShell DSC Encryption

PowerShell’s Desired State Configuration allows for routines or classes to be run on remote machines by passing a text based “properties” object to the destination end-node.  There are a growing number of Microsoft supplied “classes” and importantly, the framework allows for custom development of additional objects.

MOF Files define the inputs to the class that will be run remotely.

Pages

Subscribe to RSS - PowerShell