PowerShell Team

Automating the world one-liner at a time…

Latest posts

Dec 23, 2013
Post comments count 0
Post likes count 0

Automatically resuming Windows PowerShell Workflow jobs at logon

PowerShell Team

PowerShell Workflow helps IT Pros automate the long running tasks, or workflows, that can affect multiple managed computers or devices at the same time. Windows PowerShell Workflow is designed to be robust and recoverable. The features that are built into Windows PowerShell allow you to restart the target computers and, if the workflow is not yet complete, to reconnect to the target computers automatically and continue with the workflow commands. You can even restart the computer that is running a workflow, which allows you to run the workflow on the local computer, or include the local computer in the list of ...

Dec 19, 2013
Post comments count 0
Post likes count 0

Windows PowerShell Script Workflow Debugging

PowerShell Team

Script workflow debugging support is one of two major script debugging enhancements added in Windows PowerShell 4.0. The other new feature is script debugging in remote sessions, which is described in “Windows PowerShell Remote Debugging”. We introduced script workflow in Windows PowerShell 3.0. These are workflows written in the Windows PowerShell language that are compiled into XAML and then run in Windows Workflow Foundation. There is a subset of Windows PowerShell cmdlets that can be called inside a workflow and are executed as special Windows PowerShell workflow activities when the workflow runs. For a ni...

Dec 19, 2013
Post comments count 0
Post likes count 0

Windows PowerShell Remote Debugging

PowerShell Team

Windows PowerShell 4.0 includes two major enhancements to the script debugger. First, script debugging now works in remote sessions. Second, we’ve added debugging support for workflow scripts. This blog article describes the new remote debugging support and a following article will describe the new workflow script debugging. Remote Script Debugging in Windows PowerShell Previously, script debugging in Windows PowerShell was limited to scripts running on the local machine. If you tried to set script breakpoints in a remote session it caused an error. Now, in Windows PowerShell 4.0, you can set breakpoints in rem...

Dec 16, 2013
Post comments count 0
Post likes count 0

PowerShell Security Best Practices

PowerShell Team

We get a lot of questions about PowerShell Security Best Practices, and we got the chance to present an overview of them at this year’s (Microsoft internal) BlueHat conference. This was a 20-minute presentation, and focused on two parts:   The video was recorded, and is available here: https://channel9.msdn.com/Events/Blue-Hat-Security-Briefings/BlueHat-Security-Briefings-Fall-2013-Sessions/PowerShell-Best-Practices. Below is a link to the presentation deck, with very detailed speaker notes: PowerShell Security Best Practices.pptx Lee Holmes [MSFT] Windows PowerShell Development

Dec 9, 2013
Post comments count 0
Post likes count 0

Understanding Meta Configuration in Windows PowerShell Desired State Configuration

PowerShell Team

UPDATE 2/6/2018 - The latest information regarding LCM configuration is available in the documentation at the following link: https://docs.microsoft.com/en-us/powershell/dsc/metaconfig .......... LCM and Meta Configuration To understand the concept of Meta Configuration, first we need to know what Local Configuration Manager (LCM) is, and what its responsibilities are. In short, LCM is the engine of Windows PowerShell Desired State Configuration (DSC), and it runs on every target node. Whenever we send the DSC configuration document to a node, it’s LCM’s job to parse it and call appropriate resources which ...

Dec 5, 2013
Post comments count 0
Post likes count 0

How to Deploy and Discover Windows PowerShell Desired State Configuration Resources

PowerShell Team

A Windows PowerShell Desired State Configuration (DSC) resource contains a module file (*.psm1), an optional data file (*.psd1),and a *.schema.mof file. Details about what each of those files should look like, and how you can create those files using a DSC Resource Designer Tool, are discussed in an earlier blog post.  In this blog post, we will explore the following. Deploying DSC resources to the local computer All DSC resources should be deployed in the following folder hierarchy:-             $env: psmodulepath (folder)     &...

Nov 26, 2013
Post comments count 0
Post likes count 0

Push and Pull Configuration Modes

PowerShell Team

// bw + bsl && x + aw - ah / 2 - cw >= bsl ) { c.style.left = x + aw - ah / 2 - cw; } else { c.style.left = x + ah / 2; } if (y + ch + ah / 2 > bh + bst && y + ah / 2 - ch >= bst ) { c.style.top = y + ah / 2 - ch; } else { c.style.top = y + ah / 2; } c.style.visibility = "visible"; } } } function msoCommentHide(com_id) { if(msoBrowserCheck()) { c = document.all(com_id); if (null != c && null == c.length) { c.style.visibility = "hidden"; c.style.left = -1000; c.style.top = -1000; } } } function msoBrowserCheck() { ms = navigator.appVersion.indexOf("MSIE"); ...

Nov 21, 2013
Post comments count 0
Post likes count 0

PowerShell DSC Resource for configuring Pull Server environment

PowerShell Team

UPDATE 2/6/2018 - The latest information regarding DSC Pull Service can be found in the DSC documentation using the link - https://docs.microsoft.com/en-us/powershell/dsc/pullserver .......... DSC is a PowerShell extension that is part of Windows Server 2012 R2 and Windows 8.1. DSC enables deploying and managing configuration data for software services and managing the environment in which these services run. A DSC Pull Server is a web-based endpoint, with an OData interface. This server allows nodes to “Pull” Configuration such as providers on a periodic basis. This functionality is useful in environ...

Nov 19, 2013
Post comments count 0
Post likes count 0

Resource Designer Tool – A walkthrough writing a DSC resource

PowerShell Team

At the heart of Windows PowerShell Desired State Configuration are the resources. It is the resources which act behind the scenes for DSC to achieve its “make it so” philosophy. DSC ships with a number of resources in-box and you can take a look here for the complete list. However, once you get started with DSC, you may want to write your own resources (which are PowerShell modules) for your particular use case. This post will walk you through creating a custom DSC resource. You can take a look here to get an understanding of the schema/packaging of DSC resources. Attached with this post is the Resource Designer ...