Is it possible to create a new Image Rendition using PowerShell?

I have only been able to find .Net or XML solutions, such as...

using (SPSite site = new SPSite("http://spsite")) {
    ImageRenditionCollection imageRenditions = SiteImageRenditions.GetRenditions(site);

    ImageRendition rendition = new ImageRendition {
        Name = "New Rendition",
        Width = 295,
        Height = 295


Can this be replicated in PowerShell?

1 Answer 1


You can use .NET assemblies in PowerShell, which makes it so powerful.

add-pssnapin microsoft.sharepoint.powershell
$site = Get-SPSite "http://spsite"
$imageRenditions =  [Microsoft.SharePoint.Publishing.SiteImageRenditions]::GetRenditions($site)

        $rendition = New-Object Microsoft.SharePoint.Publishing.ImageRendition
        $rendition.Name = "New Rendition"
        $rendition.Width = 295
        $rendition.Height = 295

  • Do you know where the documentation is for this? I searched for a long time and couldn't find this. I'm out of the office this week so I'll have to give this a try when I'm back in next week. Thanks! Dec 10, 2015 at 9:42
  • It's not a factor of documentation for this in powershell, just the know-how on how to translate .NET code into powershell.
    – Mike
    Dec 10, 2015 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.