How do you add or remove shell access on a web apps content databases?
This script will grant shell access to a user on all the content databases associated with a content database.
$contentDbs = Get-SPContentDatabase -WebApplication "http://yourSharePointWebApp.com/" foreach($db in $contentDbs) { Add-SPShellAdmin -UserName "domain\user" -database $db }
Remove shell access
$contentDbs = Get-SPContentDatabase -WebApplication "http://yourSharePointWebApp.com/" foreach($db in $contentDbs) { Remove-SPShellAdmin -UserName "domain\user" -database $db }