Skip to main content
added 110 characters in body
Source Link
Marek Musielak
  • 24.2k
  • 3
  • 31
  • 64

Something like that should do the trick:

gciGet-ChildItem master:\content -rec | 
  where { $_.Locking.IsLocked() } | 
  whereWhere-Object { $_.Locking.GetOwner() -eq "sitecore\USERNAME" } | 
  % { $_.Locking.Unlock() }

You just take all the child items of the sitecore\content item, check if your chosen user is the owner of it and unlock the item.

Something like that should do the trick:

gci master:\content -rec | 
  where { $_.Locking.IsLocked() } | 
  where { $_.Locking.GetOwner() -eq "sitecore\USERNAME" } | 
  % { $_.Locking.Unlock() }

Something like that should do the trick:

Get-ChildItem master:\content -rec | 
  Where-Object { $_.Locking.GetOwner() -eq "sitecore\USERNAME" } | 
  % { $_.Locking.Unlock() }

You just take all the child items of the sitecore\content item, check if your chosen user is the owner of it and unlock the item.

Source Link
Marek Musielak
  • 24.2k
  • 3
  • 31
  • 64

Something like that should do the trick:

gci master:\content -rec | 
  where { $_.Locking.IsLocked() } | 
  where { $_.Locking.GetOwner() -eq "sitecore\USERNAME" } | 
  % { $_.Locking.Unlock() }