# Get-RASPubItemIcon

## NAME

Get-RASPubItemIcon

## SYNOPSIS

Get the published resource icon.

## SYNTAX

**Get-RASPubItemIcon** \[-[Id](#Id)] _\<uint>_ \[\[-[DirPath](#DirPath)] _\<string>_] \[-[Format](#Format) {ICO | PNG}] \[-[IconSize](#IconSize) {Normal | HighDefinition}] \[-[SiteId](#SiteId) _\<uint>_] \[_<_[_CommonParameters_](#CommonParameters)_>_]

## DESCRIPTION

Save the published resource icon to a specified directory.

Get-RASPubItemIcon command returns the full path (with filename) of the saved published resource icon.

If HD icon data is available, the icon is saved with 2 resolutions (standard and HD). Otherwise, only the standard resolution is saved.

## PARAMETERS

-**Id \<uint>**\
Published resource ID.

```
        Required?                    true

        Position?                    0

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**DirPath \<string>**\
The target directory where to save the published resource icon file.

```
        Required?                    false

        Position?                    1

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**Format <**[**IconFormat**](../classes-and-enumerations/iconformat)**>**\
The file format of the requested icon.

Possible values: ICO, PNG

```
        Required?                    false

        Position?                    named

        Default value                ICO

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**IconSize <**[**IconSizes**](../classes-and-enumerations/iconsizes)**>**\
The requested icon size.

ICO format can support both sizes at same time.

PNG format supports either Normal or High definition.

Possible values: Normal, HighDefinition

```
        Required?                    false

        Position?                    named

        Default value                

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

-**SiteId \<uint>**\
Site ID.

```
        Required?                    false

        Position?                    named

        Default value                0

        Accept pipeline input?       false

        Accept wildcard characters?  false
```

\<CommonParameters>

```
        This cmdlet supports the common parameters: Verbose, Debug,

        ErrorAction, ErrorVariable, WarningAction, WarningVariable,

        OutBuffer, PipelineVariable, and OutVariable. For more information, see 

        about_CommonParameters documentation. 
```

## INPUTS

-none-

## OUTPUTS

[RASFiles](../classes-and-enumerations/rasfiles)

## EXAMPLES

**---------- EXAMPLE 1 ----------**

Get-RASPubItemIcon -Id 11 -DirPath "C:\MyIcons\\"

Saves the icon of a published resource specified by ID.

Directory path specified in -DirPath must exist.

## RELATED LINKS

* [Get-RASPubItem](get-raspubitem)
* [Set-RASPubItem](set-raspubitem)
* [Remove-RASPubItem](remove-raspubitem)
