Category Archives: PowerShell V3

Workflows: 5 CDXML modules

Last time we saw that you’re not really using cmdlets in PowerShell workflows – you’re using workflow activities. Some cmdlets haven’t been packaged into activities and for those you need to put them in an Inlinescript block.  You can also … Continue reading

Posted in PowerShell V3, PowerShell v4 | 1 Comment

Workflows: 4 Using cmdlets

This is a simple function to return some data about a system: function get-serverdata { Get-CimInstance -ClassName Win32_OperatingSystem Get-Service Get-Process } get-serverdata   The function will return the CIM data about the operating system, then the service data and then … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Workflows: 3 parallel and sequence

I said in the first post in this series that you could force a workflow to perform tasks in parallel or in sequence. Starting with parallel you can force parallel execution by using the parallel keyword: workflow thursday1 {parallel {   … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Workflows: 2 Additional reading

If you’re really interested in using workflows you may find this series of articles I did for the Scripting Guy useful: 1. Basics – introduce workflows, key concepts and keywordshttp://blogs.technet.com/b/heyscriptingguy/archive/2012/12/26/powershell-workflows-the-basics.aspx 2. Restrictions – cmdlets not available as workflow activities, using … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Workflows: 1 Introduction

In a recent post I asked for areas of PowerShell that caused problems. Workflows were one of the things mentioned so I’ll start with a series of posts on that topic. Workflows were introduced to PowerShell in version 3.0 of … Continue reading

Posted in PowerShell V3, PowerShell v4 | Leave a comment

Share Permissions – setting deny

The last change to the share permissions functions to modify the Set-SharePermissions functions to enable the application of Deny permissions. The function becomes: #requires -Version 3.0function Set-SharePermission {[CmdletBinding()]param (  [Parameter(Mandatory=$true)]  [string]$sharename,   [string]$domain = $env:COMPUTERNAME,   [Parameter(Mandatory=$true)]  [string]$trusteeName,   [Parameter(Mandatory=$true)]  … Continue reading

Posted in CIM, PowerShell and WMI, PowerShell V3, PowerShell v4 | Leave a comment

Share Permissions – adding a Deny permission

Modifying the Add-SharePermission function to enable the application of Deny permissions is a simple matter of adding a switch parameter –deny  and modifying the way the AcreType is set: #requires -Version 3.0function Add-SharePermission {[CmdletBinding()]param (  [Parameter(Mandatory=$true)]  [string]$sharename,   [string]$domain = … Continue reading

Posted in CIM, PowerShell and WMI, PowerShell V3, PowerShell v4 | Leave a comment