Skip to main content
added 1 characters in body
Source Link
Dominic Cronin
  • 18.5k
  • 3
  • 23
  • 74

Here's how to create a TargetType. Mutatis MutandiMutandis for a Publication Target. (This is powershell with some namespace magic wired up, but enough to show the process. It's the same in C# or whatever)

$newTargetType = $core.GetDefaultData([ItemType]::TargetType, $null, $null)
$newTargetType.Title = "foobar"
$newTargetType.Description = "foobar"
$core.Create($newTargetType, $null)

As long as I've got the shell open, why not throw a couple of queries at a publication target

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null)

DefaultCodePage   : 65001
Destinations      : {Tridion.ContentManager.CoreService.Client.TargetDestinationData}
MinApprovalStatus : Tridion.ContentManager.CoreService.Client.LinkToApprovalStatusData
Priority          : Normal
Publications      : {Tridion.ContentManager.CoreService.Client.LinkToPublicationData}
TargetLanguage    : None
TargetTypes       : {Tridion.ContentManager.CoreService.Client.LinkToTargetTypeData}
Description       : visitorsweb
ExtensionData     : System.Runtime.Serialization.ExtensionDataObject
AllowedActions    :
Id                : tcm:0-1-65537
IsEditable        : True
ListInfo          :
Title             : visitorsweb
VersionInfo       :

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null).Destinations[0].Title
upload.visitorsweb.local

Enough to show that it's pretty straightforward to get most of the information you need.

Here's how to create a TargetType. Mutatis Mutandi for a Publication Target. (This is powershell with some namespace magic wired up, but enough to show the process. It's the same in C# or whatever)

$newTargetType = $core.GetDefaultData([ItemType]::TargetType, $null, $null)
$newTargetType.Title = "foobar"
$newTargetType.Description = "foobar"
$core.Create($newTargetType, $null)

As long as I've got the shell open, why not throw a couple of queries at a publication target

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null)

DefaultCodePage   : 65001
Destinations      : {Tridion.ContentManager.CoreService.Client.TargetDestinationData}
MinApprovalStatus : Tridion.ContentManager.CoreService.Client.LinkToApprovalStatusData
Priority          : Normal
Publications      : {Tridion.ContentManager.CoreService.Client.LinkToPublicationData}
TargetLanguage    : None
TargetTypes       : {Tridion.ContentManager.CoreService.Client.LinkToTargetTypeData}
Description       : visitorsweb
ExtensionData     : System.Runtime.Serialization.ExtensionDataObject
AllowedActions    :
Id                : tcm:0-1-65537
IsEditable        : True
ListInfo          :
Title             : visitorsweb
VersionInfo       :

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null).Destinations[0].Title
upload.visitorsweb.local

Enough to show that it's pretty straightforward to get most of the information you need.

Here's how to create a TargetType. Mutatis Mutandis for a Publication Target. (This is powershell with some namespace magic wired up, but enough to show the process. It's the same in C# or whatever)

$newTargetType = $core.GetDefaultData([ItemType]::TargetType, $null, $null)
$newTargetType.Title = "foobar"
$newTargetType.Description = "foobar"
$core.Create($newTargetType, $null)

As long as I've got the shell open, why not throw a couple of queries at a publication target

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null)

DefaultCodePage   : 65001
Destinations      : {Tridion.ContentManager.CoreService.Client.TargetDestinationData}
MinApprovalStatus : Tridion.ContentManager.CoreService.Client.LinkToApprovalStatusData
Priority          : Normal
Publications      : {Tridion.ContentManager.CoreService.Client.LinkToPublicationData}
TargetLanguage    : None
TargetTypes       : {Tridion.ContentManager.CoreService.Client.LinkToTargetTypeData}
Description       : visitorsweb
ExtensionData     : System.Runtime.Serialization.ExtensionDataObject
AllowedActions    :
Id                : tcm:0-1-65537
IsEditable        : True
ListInfo          :
Title             : visitorsweb
VersionInfo       :

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null).Destinations[0].Title
upload.visitorsweb.local

Enough to show that it's pretty straightforward to get most of the information you need.

Source Link
Dominic Cronin
  • 18.5k
  • 3
  • 23
  • 74

Here's how to create a TargetType. Mutatis Mutandi for a Publication Target. (This is powershell with some namespace magic wired up, but enough to show the process. It's the same in C# or whatever)

$newTargetType = $core.GetDefaultData([ItemType]::TargetType, $null, $null)
$newTargetType.Title = "foobar"
$newTargetType.Description = "foobar"
$core.Create($newTargetType, $null)

As long as I've got the shell open, why not throw a couple of queries at a publication target

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null)

DefaultCodePage   : 65001
Destinations      : {Tridion.ContentManager.CoreService.Client.TargetDestinationData}
MinApprovalStatus : Tridion.ContentManager.CoreService.Client.LinkToApprovalStatusData
Priority          : Normal
Publications      : {Tridion.ContentManager.CoreService.Client.LinkToPublicationData}
TargetLanguage    : None
TargetTypes       : {Tridion.ContentManager.CoreService.Client.LinkToTargetTypeData}
Description       : visitorsweb
ExtensionData     : System.Runtime.Serialization.ExtensionDataObject
AllowedActions    :
Id                : tcm:0-1-65537
IsEditable        : True
ListInfo          :
Title             : visitorsweb
VersionInfo       :

PS C:\Users\Administrator> $core.Read("tcm:0-1-65537", $null).Destinations[0].Title
upload.visitorsweb.local

Enough to show that it's pretty straightforward to get most of the information you need.