Skip to main content

Get-SPOSite does nownot work with ErrorAction

added 6 characters in body
Source Link
Robert Lindgren
  • 24.5k
  • 12
  • 53
  • 79

I am working with SharePoint PnP PowerShell and using below command. This command works but when the site does not exist it gives me an error on the screen even if I specified -ErrorAction:SilentlyContinue-ErrorAction:SilentlyContinue.

$objSite = Get-SPOSite -Identity $siteUrl

$objSite = Get-SPOSite -Identity $siteUrl

I am working with SharePoint PnP PowerShell and using below command. This command works but when the site does not exist it gives me an error on the screen even if I specified -ErrorAction:SilentlyContinue.

$objSite = Get-SPOSite -Identity $siteUrl

I am working with SharePoint PnP PowerShell and using below command. This command works but when the site does not exist it gives me an error on the screen even if I specified -ErrorAction:SilentlyContinue.

$objSite = Get-SPOSite -Identity $siteUrl
Source Link
Ravi Khambhati
  • 1k
  • 1
  • 22
  • 44

Get-SPOSite does now work with ErrorAction

I am working with SharePoint PnP PowerShell and using below command. This command works but when the site does not exist it gives me an error on the screen even if I specified -ErrorAction:SilentlyContinue.

$objSite = Get-SPOSite -Identity $siteUrl