Failed to create External Feed using API create function powershell

Hi Team,

I tried creating feed in octopus using powershell. But I am getting error " Exception calling “Create” with “1” argument(s): “Octopus Server returned an error: Unable to determine type to deserialize. FeedType None does not map to a known

I could not assign FeedType also as it is readonly field. Could you please help ASAP?

Please find my code below.

If ($repository.Feeds.FindByName($FeedName)){

write-output “Feed already exists: $feedname”



$Properties = @{
FeedUri= $FeedURI
Name= $FeedName

$FeedObj = New-Object Octopus.Client.Model.FeedResource -Property $Properties



Thanks in Advance

Hi Kiruthika,

Thanks for reaching out.

I wrote some code over here that seems to do the trick. You want to create the type of resource that you want and add that to the feeds resource.

For instance for a docker feed, you will create:

$dockerfeed = New-Object Octopus.Client.Model.DockerFeedResource

There is also GitHubFeedResource, AwsElasticContainerRegistryFeedResource, BuiltInFeedResouce, HelmFeedResource, MavenFeedResource, and NuGetFeedResource

This is example code for Docker feeds (I have added extra code to dig into the space repository on my Octopus Instance):

Add-Type -Path 'C:\temp\Octopus.Client.dll' 
$OctopusUrl = ""
$ApiKey = ""
$endpoint = New-Object Octopus.Client.OctopusServerEndpoint $OctopusUrl,$ApiKey
$client = new-object Octopus.Client.OctopusClient $endpoint

#open up space repository to modify it
$spaceName = "Default"
$space = $client.ForSystem().Spaces.FindByName($spaceName)
$spaceRepository = $client.ForSpace($space)

#docker feed variables
$FeedName = "Fake Docker"
$FeedURI = ""
$RegistryPath = ""

If ($spaceRepository.Feeds.FindByName($FeedName)){

write-output “Feed already exists: $feedname”


$dockerfeed = New-Object Octopus.Client.Model.DockerFeedResource
$dockerfeed.RegistryPath = $RegistryPath
$dockerfeed.FeedUri = $FeedURI
$dockerfeed.Name = $FeedName


As always, please test code given by support or on our github thoroughly before putting into production. It is not guaranteed to work in every setup.

You can see the types of models at this repository here:

Please let me know if it works for you or if you need more assistance with it.


Hi Jeremy,

Thanks for the quick reply. It is working fine now.

1 Like

Hi Kiruthika,

You’re very welcome! Thank you for letting me know.

I hope you have a great weekend.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.