# Find all the items under content recursively, then only return the properties you want. Here we only want items that are locked. gci master:\content -rec | where { $_.Locking.IsLocked() } | select Name, Id, @{n="IsLocked";e={$_.Locking.IsLocked()}}
The following aliases or shortened commands were used:
- gci = Get-ChildItem
- where = Where-Object
- select = Select-Object
# Unlock all the items. gci master:\content -rec | where { $_.Locking.IsLocked() } | % { $_.Locking.Unlock() }
No comments:
Post a Comment