Using PowerShell Commands
The provider now supports infinitely complex paths (including circular ones), and copy
( copy-item ), move
(move-item) and delete
e.g. clear all alerts for the 'username' found in the contributor role:
or make the cross-site group 'crosssitegroup' part of the administrator role:
copy !groups\crosssitegroup !roles\administrator\
perhaps upgrade perms for 'crosssitegroup' from reader to contributor:
move !roles\reader\crosssitegroup !roles\contributor
Of course, wildcards work too, so let loose!
Pseudo Container Paths
These are special directories that will tab complete (e.g. hit the tab key while inside a directory), but not show up in get-childitems
. So, you can set-location
to them and they will behave like an ordinary folder.
When in the context of certain containers, only a subset of these will appear. For example, when in the user container (!users), only !groups and !alerts are available.
These items are considered containers:
These are considered leaf nodes:
What can I do?
I've implemented a handful of what I call "adders" and "removers" to allow basic copy/move/delete functionality between different types of compatible (and incompatible) paths. So, what do I mean by "incompatible?" For example, it is currently possible to do:
move-item \!users\oisin \!roles\contributor\
So, what happens is the user oisin gets copied to the contributor role (ok) and then is removed from the source (not ok). In sharepoint terms, this makes oisin a contributor, and then removes him from the site users -- which also removes him from contributors :)
What's coming next?
- Support for new-item is sorely lacking right now.
- Only supports drive-qualified operation -- e.g. you must map a PSDrive first
- Non-existant formatting of sharepoint types : need sharepoint.formats.ps1xml file