SPWebPartManager.SaveChanges – Parameters

We need to update or change properties of a web part on different pages. For this, wrote a power shell script that updates or change the properties of the webpart. When we try to save the change properties using SPWebPartManager.SaveChanges method, our script through exception

As per MS, SPWebPartManager.SaveChanges takes storageKey as valid parameter but our script through exception every time we run it with the storageKey as parameter.


Google it and tried to pass webpart as parameter. Worked like a charm.

Still looking at the documentation and wondering………………….


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: