In a system, when I run
Get-SPSite | Get-SPWeb
It shows the error:
Get-SPWeb : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
But if I run
$sites = get-spsite ;
foreach ($site in $sites)
{
Write-Host 'Processing ' $site;
get-spweb $site.Url
}
Everything works fine.
Anyone knows what can cause this issue?
UAC is Off, obviously, the account has permission to run the cmdlet, what else it can be? Any idea?
Thanks