Search Results for

    Show / Hide Table of Contents

    How to create a patchable Target Type

    To create a target type and properties for a patchable target be sure to use the -CanPatch switch parameter to mark it as being patchable.

    A patchable target type can be used to create target items that are patchable. Only target items that are created with a target type that has the CanPatch attribute are able to be patched.

    The following example lists the minimum properties required to create a patchable target type:

    $hostType = Set-RpsTargetType -Name 'EsxHost' -IsRoot -CanPatch
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'ComputerName' -PropertyType Text -IsRequired
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'IPAddress' -PropertyType Text -IsRequired
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'RunPackagesOnSma' -PropertyType Boolean -DefaultValue 'True'
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'OsType' -PropertyType Text - DefaultValue 'ESX'
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'Architecture' -PropertyType Text - DefaultValue 'x86'
    $null = Set-RpsTypeProperty -Parent $hostType -Name 'OsVersion' -PropertyType Text - DefaultValue '10.12.10'
    

    Description of the type properties:

    | Property Name    | Property Type | Description   |
    | ---------------- |:--------------:| ------------:|
    | ComputerName     | text           | Name of the Target |
    | IPAddress        | text           | IP Address of the Target |
    | RunPackagesOnSma | boolean        | Indicates whether to deploy Packages from SMA instead of from the target itself (SMA acts as a proxy) |
    | OsType           | text           | OS Type (e.g. Linux, Windows, ESX) |
    | Architecture     | text           | Architecture of the Target |
    | OsVersion        | text           | OS Version |
    
    In This Article
    Back to top Generated by DocFX