spsite
1 TopicSharePoint (2019) PowerShell Command for SPSite.WebApplication.Properties
We are trying to set and get properties in WebApplication using following code SPSite site = new SPSite(<SiteUrl>) // or SPSite site = SPFeatureReceiverProperties.Feature.Parent as SPSite // set property site.WebApplication.Properties.Add("Property1", "Value1") // get property site.WebApplication.Properties["Property1] We don't get any errors in above code. Now, we want to get and update this property via powershell. We have already tried following commands: 1.Get-SPWeb $site=Get-SPWeb -Identity "<SiteUrl>" $site.Properties 2. Get-SPSite $site=Get-SPSite "<SiteUrl>" $site.WebApplication.Properties 3.Get-SPSite (OpenWeb()) $site=Get-SPSite "<SiteUrl>" $web=$site.OpenWeb() $web.Properties Unfortunately, we were unable to retrieve or set the property using these PowerShell commands, which corresponds to the functionality used in the .NET code. We need assistance in determining how to update or retrieve the property set using the mentioned code via PowerShell.1.9KViews0likes4Comments