PowerShell for Windows Admins:

May, 2014


May 18, 2014  12:44 PM

Share Permissions – adding a Deny permission

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

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.0 function Add-SharePermission { [CmdletBinding()] param...

May 18, 2014  8:40 AM

Share Permissions – working with Deny

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, WMI

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 is to modify Get-SharePermission so that it...


May 18, 2014  8:24 AM

Error trapping when getting AD objects

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
Active Directory Administration

How many times have you done this: £> Get-ADComputer -Identity "bleh" Get-ADComputer : Cannot find an object with identity: 'bleh' under: 'DC=Manticore,DC=org'. At line:1 char:1 + Get-ADComputer -Identity "bleh" + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo :...


May 18, 2014  5:16 AM

Share Permissions – changing

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, PowerShell v3, WMI

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. I’ll be covering Deny permissions in later posts. This mimics the way...


May 17, 2014  7:02 AM

Share Permissions – Removing

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, PowerShell v3, WMI

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 tweak. #requires -Version 3.0 function Remove-SharePermission...


May 16, 2014  1:23 PM

Share Permissions – adding

Richard Siddaway Richard Siddaway Profile: Richard Siddaway
CIM, PowerShell v3, WMI

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 where you need to add extra permissions. I’ve written the function...


May 15, 2014  1:40 PM

Share Permissions – getting

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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 in the past. My test machine has a test share called Test2April so...


May 14, 2014  1:09 PM

Domain Controllers and their sites

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Its relatively straightforward to find the domain controllers in your AD domain and its equally as straightforward to find the sites in your AD forest. Discovering which domain controllers are in which site is a bit more problematic. One way is look at the nTDSDSA objects. These are in the...


May 14, 2014  10:51 AM

Provider is not capable of the attempted operation

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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 operation” was part of the reported...


May 13, 2014  12:45 PM

Working with Server Core–renaming the machine

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

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 a computer is simple On the local computer run Rename-Computer -NewName...


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: