I have a foreach
loop in powershell to delete all deleted sites that are already in recycle bin of SharePoint. But when I run this loop it asks me weather I'm sure to do this or not for every single item.
How can I bypass this approval in my foreach
statements in general?
Get-SPDeletedSite | ForEach-Object {Remove-SPDeletedSite -identity $_}