Category Archives: PowerShell V3

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

Share Permissions – working with Deny

Permissions can be set to either allow access ot to deny access.  The functions I’ve presented so far only work with Allow permissions. Using Deny permissions should be avoided if at all possible but sometimes there’s no alternative. First thing … Continue reading

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

Share Permissions – changing

So far you’ve seen how to read, remove and add permissions to a share.  The final scenario to be covered is modifying a permission. The functions I’ve presented to date only enable you to set Allow permissions on a share. … Continue reading

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

Share Permissions – Removing

You’ve seen how to read share permissions and how to add share permissions – now its time to remove share permissions.  Most of the code we need is in the Add-Sharepermission function – it just needs a bit of a … Continue reading

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

Share Permissions – adding

Having seen how to read the permissions on a share its time to turn to one of the other common tasks associated with shares – adding permissions.  This is usually done when the share is created but there are scenarios … Continue reading

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

Share Permissions – getting

I’ve written about working with share permissions a couple of times but a post on the forum (powershell.org) got me thinking about it again.  This time I’m going to use the CIM cmdlets rather than the WMI cmdlets I’ve used … Continue reading

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

Provider is not capable of the attempted operation

A question on the (powershell.org) forum described a situation where the user was trying to use Set-WmiInstance to set a property on a particular WMI class instance. The attempt failed and the message “Provider is not capable of the attempted … Continue reading

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

Working with Server Core–renaming the machine

When you create a new Windows server it usually assigns a name of its own. I always prefer using my own names for servers – I usually create the name so it gives some indication of the machine’s purpose. Renaming … Continue reading

Posted in PowerShell V3, PowerShell v4, Windows Server 2012, Windows Server 2012 R2 | Leave a comment