Error on InstallSPOSolution

Oct 14, 2014 at 1:50 PM
Hi,

Been having issues with InstallSPOSolution I think it's to do with the "WriteObject(Site);" line. The solution activates fine but then fails with the following error
"
format-default : The collection has not been initialized. It has not been requested or the request has not been executed. It may need to be explicitly requested.
+ CategoryInfo          : NotSpecified: (:) [format-default], CollectionNotInitializedException
+ FullyQualifiedErrorId : Microsoft.SharePoint.Client.CollectionNotInitializedException,Microsoft.PowerShell.Commands.FormatDefaultCommand
"

Anyone else had this issue or have a fix for it?

Thanks.
Oct 14, 2014 at 2:17 PM
Fixed by setting the entire InstallSPOSolution command as a variable.
Jan 6, 2015 at 10:15 PM
Do you have an example Gary? I put the command to variable but get different error
Feb 24, 2015 at 5:55 PM
I get the error: The remote server returned an error: (403) Forbidden.
How would i go about setting the entire InstallSPOSolution command as a variable?
Mar 3, 2015 at 9:45 AM
Well I just made it a variable like this

$varInstall1 = Install-SPOSolution -Site $clientContext.Site -Solution solname.wsp -ErrorAction Ignore

but this has stopped working too seemingly. I'm not getting forbidden errors again.
Feb 3, 2016 at 3:57 PM
Edited Feb 3, 2016 at 3:57 PM
Any updates on this, i am also receiving the same error "The remote server returned an error: (403) Forbidden" when i try to use the InstallSPOSolution command