< Back

Update-OctopusResource

Sat Jan 18, 2020 5:31 pm

NAME Update-OctopusResource



SYNOPSIS

Updates resources from an Octopus Instance. This is an advanced cmdlet and all its examples involve multiple lines

of code. Please check the advanced examples for a better reference:

https://github.com/Dalmirog/OctoPosh/wi ... d-Examples



Updates resources from an Octopus Instance. This is an advanced cmdlet and all its examples involve multiple lines

of code. Please check the advanced examples for a better reference:

https://github.com/Dalmirog/OctoPosh/wi ... d-Examples





SYNTAX

Update-OctopusResource [[-Resource] <Resource>] [<CommonParameters>]





DESCRIPTION





PARAMETERS

-Resource <Resource>

Resource Object



Required? false

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

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 (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

Octopus.Client.Model.Resource

Resource Object





OUTPUTS

Octopus.Client.Model.ChannelResource



Octopus.Client.Model.EnvironmentResource



Octopus.Client.Model.LibraryVariableSetResource



Octopus.Client.Model.LifecycleResource



Octopus.Client.Model.MachineResource



Octopus.Client.Model.NuGetFeedResource



Octopus.Client.Model.ProjectGroupResource



Octopus.Client.Model.ProjectResource



Octopus.Client.Model.TagSetResource



Octopus.Client.Model.TeamResource



Octopus.Client.Model.TenantResource



Octopus.Client.Model.UserResource





---------- EXAMPLE 1 ----------



PS C:\\> $pg = Get-OctopusProjectGroup -name SomeProjectName ; $pg.resource.name = "SomeOtherProjectName" ;

Update-OctopusResource -resource $pg.resource



Updates the Name of a ProjectGroup

---------- EXAMPLE 2 ----------



PS C:\\> $machine = Get-OctopusMachine -MachineName "SQL_Production" ; $machine.resource.isdisabled = $true ;

Update-OctopusResource -resource $machine.resource



Updates the [IsDisabled] property of a machine to disable it



RELATED LINKS

WebSite: http://Octoposh.net

Github Project: https://github.com/Dalmirog/OctoPosh/

Wiki: http://octoposh.readthedocs.io

QA and Feature requests: https://gitter.im/Dalmirog/OctoPosh#initial