en-US/MSCKite.Azure.Platform.dll-Help.xml
|
<?xml version="1.0" encoding="utf-8"?>
<helpItems xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" schema="maml" xmlns="http://msh"> <command:command> <command:details> <command:name>Connect-AdoOrganization</command:name> <maml:description> <maml:para>Connects to an Azure DevOps organization and optionally a project within it.</maml:para> </maml:description> <command:verb>Connect</command:verb> <command:noun>AdoOrganization</command:noun> </command:details> <maml:description> <maml:para>Validates authentication against Azure DevOps and marks the session as connected so that other Azure DevOps commands in this module can use it. Requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Connect-AdoOrganization</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="O"> <maml:name>Organization</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="P"> <maml:name>Project</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="O"> <maml:name>Organization</maml:name> <maml:description> <maml:para>The name of the Azure DevOps organization to connect to.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="P"> <maml:name>Project</maml:name> <maml:description> <maml:para>The name of the Azure DevOps project to connect to within the specified organization.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe the organization or project name to this cmdlet by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.DevOpsContext</maml:name> </dev:type> <maml:description> <maml:para>Represents the connected Azure DevOps organization and project.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Connect to an organization ---------</maml:title> <maml:introduction> <maml:para>```powershell Connect-AdoOrganization -Organization "https://dev.azure.com/myorg" ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Connect to an organization and project ---------</maml:title> <maml:introduction> <maml:para>```powershell Connect-AdoOrganization -Organization "https://dev.azure.com/myorg" -Project "My Project" ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Disconnect-AdoOrganization</command:name> <maml:description> <maml:para>Disconnects the current Azure DevOps session established by Connect-AdoOrganization.</maml:para> </maml:description> <command:verb>Disconnect</command:verb> <command:noun>AdoOrganization</command:noun> </command:details> <maml:description> <maml:para>Clears the current Azure DevOps session state. If no session is connected, the cmdlet has no effect.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Disconnect-AdoOrganization</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.DevOpsContext</maml:name> </dev:type> <maml:description> <maml:para>The context that was disconnected, or `$null` if the session was already disconnected.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Disconnect from Azure DevOps ---------</maml:title> <maml:introduction> <maml:para>```powershell Disconnect-AdoOrganization ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Disconnect-PlatformContext</command:name> <maml:description> <maml:para>Signs out of every currently signed-in context: Azure, Azure DevOps, and GitHub.</maml:para> </maml:description> <command:verb>Disconnect</command:verb> <command:noun>PlatformContext</command:noun> </command:details> <maml:description> <maml:para>Checks the sign-in status of Azure, Azure DevOps, and GitHub, and signs out of each context that is currently signed in. Contexts that are already signed out are left untouched. Requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Disconnect-PlatformContext</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>A JSON string summarizing which contexts were signed out, or a message stating everything was already signed out.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Sign out of all connected platform contexts ---------</maml:title> <maml:introduction> <maml:para>```powershell Disconnect-PlatformContext ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-AdoDefault</command:name> <maml:description> <maml:para>Gets the default Azure DevOps organization and project previously stored with Set-AdoDefault.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>AdoDefault</command:noun> </command:details> <maml:description> <maml:para>Returns the Organization, Project, and CollectionUri currently stored for use by other Azure DevOps commands. If no defaults have been set, the returned values are empty.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-AdoDefault</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.AdoDefaults</maml:name> </dev:type> <maml:description> <maml:para>The Organization, Project, and CollectionUri currently stored via Set-AdoDefault.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Get the current Azure DevOps defaults ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-AdoDefault ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-GitHubDefault</command:name> <maml:description> <maml:para>Gets the default GitHub owner and repository previously stored with Set-GitHubDefault.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>GitHubDefault</command:noun> </command:details> <maml:description> <maml:para>Returns the Owner, Repository, and RepositoryUri currently stored for use by other GitHub commands. If no defaults have been set, the returned values are empty.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-GitHubDefault</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.GitHubDefaults</maml:name> </dev:type> <maml:description> <maml:para>The Owner, Repository, and RepositoryUri currently stored via Set-GitHubDefault.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Get the current GitHub defaults ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-GitHubDefault ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-PlatformContext</command:name> <maml:description> <maml:para>Gets the combined sign-in status for Azure, Azure DevOps, and GitHub as a single JSON object.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>PlatformContext</command:noun> </command:details> <maml:description> <maml:para>Combines the Azure context, the Azure DevOps REST API auth status, and the local GitHub CLI auth status into a single JSON object. By default, contexts that are not signed in are omitted. Requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PlatformContext</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>All</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>All</maml:name> <maml:description> <maml:para>Includes contexts that are not signed in, with the reason surfaced as a warning, instead of omitting them.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>A JSON string combining the Azure, Azure DevOps, and GitHub contexts. Nothing is written if no context qualifies.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet requires the Az.Accounts module version 5.5 or higher.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Get the status of all signed-in contexts ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformContext ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Get the status of every context, including those not signed in ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformContext -All ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Get-PlatformTemplate</command:name> <maml:description> <maml:para>Downloads one or more folders (with their subfolders and files) from the Azure Platform Kite repository into a local folder.</maml:para> </maml:description> <command:verb>Get</command:verb> <command:noun>PlatformTemplate</command:noun> </command:details> <maml:description> <maml:para>Shallow-clones the `az-platform-kite` repository (or `-RepositoryUrl`/`-Branch` override) to a temporary folder, copies the folder(s) listed in `-IncludedFolders` into `-OutputFolder` (preserving their relative path and subfolders/files), then deletes the temporary clone. By default, `-IncludedFolders` is `templates` and `-OutputFolder` is `.downloads`, a dedicated folder so rerunning the cmdlet never overwrites configuration files already in use elsewhere in the workspace. Use `-Force` to overwrite files that already exist at the destination.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PlatformTemplate</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>IncludedFolders</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string[]</command:parameterValue> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>OutputFolder</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>RepositoryUrl</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Branch</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Branch</maml:name> <maml:description> <maml:para>The repository branch to clone. Defaults to `main`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites files that already exist at the destination instead of failing.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="none"> <maml:name>IncludedFolders</maml:name> <maml:description> <maml:para>Relative folder path(s) inside the repository to copy, including their subfolders and files. Defaults to `templates`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String[]</command:parameterValue> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="none"> <maml:name>OutputFolder</maml:name> <maml:description> <maml:para>Local folder to copy the downloaded folder(s) into. Defaults to `.downloads`, a dedicated folder separate from any in-use configuration so reruns never overwrite it.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>RepositoryUrl</maml:name> <maml:description> <maml:para>The git URL to clone. Defaults to the `az-platform-kite` repository.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para>You can pipe folder paths to `-IncludedFolders` by property name.</maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe a destination path to `-OutputFolder` by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.RepoTemplateDownloadResult</maml:name> </dev:type> <maml:description> <maml:para>The repository URL/branch, the resolved output folder, the copied folder and file paths, and whether the download succeeded.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Requires the `git` CLI to be installed and available on `PATH`.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Download the default templates folder ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformTemplate ```</maml:para> <maml:para>€</maml:para> <maml:para>Copies the repository's `templates` folder into `.downloads\templates`.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Download specific folders to a custom location ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformTemplate -IncludedFolders 'templates', 'templates/github' -OutputFolder ./config-src -Force ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 - Download from a specific branch and feed New-PlatformConfigStructure ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformTemplate -Branch release -OutputFolder ./config-src New-PlatformConfigStructure -InputFolder ./config-src/templates -OutputFolder ./config ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>New-PlatformConfigStructure</command:name> <maml:description> <maml:para>Scaffolds the platform configuration folder, creating a `global-config.jsonc` file either from a default template or copied from an existing input folder.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>PlatformConfigStructure</command:noun> </command:details> <maml:description> <maml:para>Creates `-OutputFolder` (default `config`) if it doesn't exist and writes a `global-config.jsonc` file into it. Without `-InputFolder`, a default template is written. With `-InputFolder`, the cmdlet copies `global-config.jsonc` from that folder instead, for example the `templates` folder downloaded by `Get-PlatformTemplate`. Fails if the output folder already contains a platform configuration structure, unless `-Force` is specified to overwrite it.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-PlatformConfigStructure</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>OutputFolder</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>InputFolder</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Force</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>Force</maml:name> <maml:description> <maml:para>Overwrites an already-initialized configuration folder instead of failing.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>InputFolder</maml:name> <maml:description> <maml:para>Folder containing a `global-config.jsonc` file to copy into `-OutputFolder`. When omitted, a default `global-config.jsonc` template is generated instead.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="none"> <maml:name>OutputFolder</maml:name> <maml:description> <maml:para>Destination folder for the platform configuration structure. Defaults to `config`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe a destination path to `-OutputFolder` by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.PlatformConfigFolderResult</maml:name> </dev:type> <maml:description> <maml:para>The resolved configuration root path, any folders created, the `global-config.jsonc` path, and whether scaffolding succeeded.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Scaffold config using the default template ---------</maml:title> <maml:introduction> <maml:para>```powershell New-PlatformConfigStructure ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Scaffold config from a downloaded templates folder ---------</maml:title> <maml:introduction> <maml:para>```powershell Get-PlatformTemplate -OutputFolder ./config-src New-PlatformConfigStructure -InputFolder ./config-src/templates -OutputFolder ./config ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 - Overwrite an existing configuration folder ---------</maml:title> <maml:introduction> <maml:para>```powershell New-PlatformConfigStructure -OutputFolder ./config -Force ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>New-RandomPassword</command:name> <maml:description> <maml:para>Generates cryptographically secure random passwords with configurable complexity, length, and output formats.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>RandomPassword</command:noun> </command:details> <maml:description> <maml:para>Generates random passwords using a cryptographically secure random number generator. By default, passwords are 16 characters long and include uppercase letters, lowercase letters, numbers, and special characters. When multiple character sets are enabled, each generated password contains at least one character from every enabled set. Use `-ExcludeCharacters` or `-NoAmbiguousCharacters` for human-readable passwords, and use `-AsSecureString` when a password must be passed directly to cmdlets that accept secure strings.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-RandomPassword</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="None"> <maml:name>Length</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Int16</command:parameterValue> <dev:type> <maml:name>System.Int16</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Uppercase</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Lowercase</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Numbers</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>SpecialCharacters</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="None"> <maml:name>SpecialCharacterSet</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>AsSecureString</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="None"> <maml:name>ExcludeCharacters</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>NoAmbiguousCharacters</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="None"> <maml:name>Count</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">Int32</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>AsSecureString</maml:name> <maml:description> <maml:para>Returns each generated password as a read-only `SecureString` instead of a password object.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>Count</maml:name> <maml:description> <maml:para>Specifies how many unique passwords to generate.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.Int32</command:parameterValue> <dev:type> <maml:name>System.Int32</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>ExcludeCharacters</maml:name> <maml:description> <maml:para>Specifies characters to remove from every enabled character set before generating passwords.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>Length</maml:name> <maml:description> <maml:para>Specifies the password length. The minimum length is 8 and the maximum length is 256.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.Int16</command:parameterValue> <dev:type> <maml:name>System.Int16</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>Lowercase</maml:name> <maml:description> <maml:para>Includes lowercase letters from `a` through `z`. This character set is enabled by default. Use `-Lowercase:$false` to disable it.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>NoAmbiguousCharacters</maml:name> <maml:description> <maml:para>Excludes predefined visually similar characters from every enabled character set. The excluded characters are `0`, `O`, `o`, `1`, `l`, `L`, `i`, `I`, `5`, `S`, `s`, `8`, `B`, and `b`.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>Numbers</maml:name> <maml:description> <maml:para>Includes numeric characters from `0` through `9`. This character set is enabled by default. Use `-Numbers:$false` to disable it.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>SpecialCharacters</maml:name> <maml:description> <maml:para>Includes special characters. This character set is enabled by default. Use `-SpecialCharacters:$false` to disable it.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>SpecialCharacterSet</maml:name> <maml:description> <maml:para>Specifies the characters used by the special character category.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="None"> <maml:name>Uppercase</maml:name> <maml:description> <maml:para>Includes uppercase letters from `A` through `Z`. This character set is enabled by default. Use `-Uppercase:$false` to disable it.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes /> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.RandomPasswordResult</maml:name> </dev:type> <maml:description> <maml:para>The default output object containing the generated password, password length, and complexity label.</maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.Security.SecureString</maml:name> </dev:type> <maml:description> <maml:para>When `-AsSecureString` is specified, the cmdlet returns each generated password as a read-only secure string.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>`New-RandomPassword` uses `System.Security.Cryptography.RandomNumberGenerator` and rejection sampling to avoid modulo bias when selecting characters.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Generate a default password ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomPassword ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates one 16-character password containing uppercase, lowercase, numeric, and special characters.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Generate a longer password ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomPassword -Length 32 ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates one 32-character password.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 - Exclude ambiguous characters ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomPassword -NoAmbiguousCharacters ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates a password that excludes visually similar characters such as `0`, `O`, `o`, `1`, `l`, `L`, `i`, `I`, `5`, `S`, `s`, `8`, `B`, and `b`.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 4 - Use a custom special character set ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomPassword -Length 20 -SpecialCharacterSet '!@#$%' ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates a 20-character password and uses only the supplied special characters for the special character category.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 5 - Generate multiple passwords ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomPassword -Count 10 ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates 10 unique password objects.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 6 - Return a SecureString ---------</maml:title> <maml:introduction> <maml:para>```powershell $Password = New-RandomPassword -AsSecureString ```</maml:para> <maml:para>€</maml:para> <maml:para>Returns the generated password as a read-only `SecureString`.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>New-RandomUniqueId</command:name> <maml:description> <maml:para>Generates a simple random alphanumeric identifier for non-security use cases.</maml:para> </maml:description> <command:verb>New</command:verb> <command:noun>RandomUniqueId</command:noun> </command:details> <maml:description> <maml:para>Generates a random string from uppercase letters, lowercase letters, and numbers. The identifier is intended for test data, resource suffixes, demo environments, and temporary object names. It does not contain special characters and is not suitable for passwords, secrets, or security tokens.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-RandomUniqueId</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Length</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">short</command:parameterValue> <dev:type> <maml:name>System.Int16</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="Named" aliases="none"> <maml:name>Length</maml:name> <maml:description> <maml:para>Specifies the identifier length. The minimum length is 4, the maximum length is 12, and the default length is 8.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.Int16</command:parameterValue> <dev:type> <maml:name>System.Int16</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.Int16</maml:name> </dev:type> <maml:description> <maml:para>You can pipe an object with a `Length` property to this cmdlet.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>The cmdlet returns the generated identifier as a plain string.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet uses a pseudo-random number generator and does not provide cryptographic security or guaranteed global uniqueness.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Generate an identifier with the default length ---------</maml:title> <maml:introduction> <maml:para>```powershell New-RandomUniqueId ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates an 8-character alphanumeric string.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Generate a shorter resource suffix ---------</maml:title> <maml:introduction> <maml:para>```powershell $ProjectSuffix = New-RandomUniqueId -Length 6 $StorageAccountName = "stg$ProjectSuffix" $ResourceGroupName = "rg-$ProjectSuffix" ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates a 6-character suffix and uses it in temporary Azure resource names.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 - Supply lengths through the pipeline ---------</maml:title> <maml:introduction> <maml:para>```powershell @( [pscustomobject]@{ Length = 4 } [pscustomobject]@{ Length = 12 } ) | New-RandomUniqueId ```</maml:para> <maml:para>€</maml:para> <maml:para>Generates one identifier for each input object by binding its `Length` property.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Set-AdoDefault</command:name> <maml:description> <maml:para>Sets the default Azure DevOps organization and project used by other Azure DevOps commands.</maml:para> </maml:description> <command:verb>Set</command:verb> <command:noun>AdoDefault</command:noun> </command:details> <maml:description> <maml:para>Persists the Organization and Project as defaults for later Azure DevOps commands. Pass `$null` (or omit a parameter) to clear that value.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-AdoDefault</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Organization</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Project</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="none"> <maml:name>Organization</maml:name> <maml:description> <maml:para>The name of the Azure DevOps organization to use as the default. Pass `$null` to clear it. The name of the Azure DevOps organization to use as the default. Pass `$null` to clear it.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="none"> <maml:name>Project</maml:name> <maml:description> <maml:para>The name of the Azure DevOps project to use as the default. Pass `$null` to clear it. The name of the Azure DevOps project to use as the default. Pass `$null` to clear it.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe the organization or project name to this cmdlet by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.AdoDefaults</maml:name> </dev:type> <maml:description> <maml:para>The Organization, Project, and CollectionUri that were persisted.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para /> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Set the default organization and project ---------</maml:title> <maml:introduction> <maml:para>```powershell Set-AdoDefault -Organization "myorg" -Project "My Project" ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Set-GitHubDefault</command:name> <maml:description> <maml:para>Sets the default GitHub owner and repository used by other GitHub commands.</maml:para> </maml:description> <command:verb>Set</command:verb> <command:noun>GitHubDefault</command:noun> </command:details> <maml:description> <maml:para>Persists the Owner and Repository as defaults for later GitHub commands. Pass `$null` (or omit a parameter) to clear that value. This is **not** the same as the GitHub CLI's own default repository (`gh repo set-default`). `Set-GitHubDefault` writes a single, global, per-user default to `github-config.jsonc`, independent of the current directory; this is intentional, so it keeps working outside of any git repo, such as in Azure DevOps or GitHub Actions pipeline steps. `gh repo set-default` instead sets a per-clone default in that repository's `.git/config`, used by `gh` commands like `gh pr` and `gh issue`. If you want `gh` itself to default to a specific repository, run `gh repo set-default` directly.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-GitHubDefault</maml:name> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="none"> <maml:name>Owner</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Repository</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="none"> <maml:name>Owner</maml:name> <maml:description> <maml:para>The name of the GitHub owner (user or organization) to use as the default. Pass `$null` to clear it. The name of the GitHub owner (user or organization) to use as the default. Pass `$null` to clear it.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="none"> <maml:name>Repository</maml:name> <maml:description> <maml:para>The name of the GitHub repository to use as the default. Pass `$null` to clear it. The name of the GitHub repository to use as the default. Pass `$null` to clear it.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe the owner or repository name to this cmdlet by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.GitHubDefaults</maml:name> </dev:type> <maml:description> <maml:para>The Owner, Repository, and RepositoryUri that were persisted.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet does not call or configure the GitHub CLI. See the DESCRIPTION section for how this default relates to `gh repo set-default`.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Set the default owner and repository ---------</maml:title> <maml:introduction> <maml:para>```powershell Set-GitHubDefault -Owner "myorg" -Repository "myrepo" ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command> <command:details> <command:name>Set-GitHubLabels</command:name> <maml:description> <maml:para>Creates, updates, and removes GitHub repository labels to match a labels definition file.</maml:para> </maml:description> <command:verb>Set</command:verb> <command:noun>GitHubLabels</command:noun> </command:details> <maml:description> <maml:para>Reconciles the labels on a GitHub repository with a jsonc definitions file, matching labels by their `name`. Labels present in the file but missing on the repository are created, labels that exist on both but have a different `color` or `description` are updated, and labels that exist on the repository but aren't listed in the file are removed unless `-KeepExistingLabels` is specified. The labels file can be either a top-level JSON array of label objects, or an object with a `labels` array property. JSONC comments and trailing commas are allowed. Each label object requires a `name` and a `color` (a 6-digit hex value, with or without a leading `#`, e.g. `#d73a4a`), and may include an optional `description`. `Owner` and `Repository` fall back to the values stored via `Set-GitHubDefault` when not specified. This cmdlet supports `-WhatIf`/`-Confirm` and shells out to the GitHub CLI (`gh`), so you must be signed in (`gh auth login`) with permission to manage labels on the target repository.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Set-GitHubLabels</maml:name> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0" aliases="Path"> <maml:name>LabelFilePath</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="1" aliases="none"> <maml:name>Owner</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="2" aliases="none"> <maml:name>Repository</maml:name> <maml:description /> <command:parameterValue required="true" variableLength="false">string</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>KeepExistingLabels</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>WhatIf</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="named" aliases="none"> <maml:name>Confirm</maml:name> <maml:description /> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="cf"> <maml:name>Confirm</maml:name> <maml:description> <maml:para>Prompts you for confirmation before running the cmdlet.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="none"> <maml:name>KeepExistingLabels</maml:name> <maml:description> <maml:para>Preserves repository labels that aren't present in the input file instead of removing them.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> <command:parameter required="true" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="0" aliases="Path"> <maml:name>LabelFilePath</maml:name> <maml:description> <maml:para>Path to a jsonc file containing the desired labels: either a top-level array of label objects, or an object with a `labels` array property. Each label requires a `name` and a `color` (6-digit hex, with or without a leading `#`), and may include a `description`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="1" aliases="none"> <maml:name>Owner</maml:name> <maml:description> <maml:para>The name of the GitHub owner (user or organization) of the repository. Falls back to the value stored via `Set-GitHubDefault` when not specified.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="true (ByPropertyName)" position="2" aliases="none"> <maml:name>Repository</maml:name> <maml:description> <maml:para>The name of the GitHub repository whose labels should be synced. Falls back to the value stored via `Set-GitHubDefault` when not specified.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">System.String</command:parameterValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> </command:parameter> <command:parameter required="false" variableLength="false" globbing="false" pipelineInput="false" position="Named" aliases="wi"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para>Runs the command in a mode that only reports what would happen without performing the actions.</maml:para> </maml:description> <dev:type> <maml:name>System.Management.Automation.SwitchParameter</maml:name> </dev:type> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para>You can pipe the label file path, owner, or repository name to this cmdlet by property name.</maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>MSCKite.Azure.Platform.Models.GitHubLabelSyncResult</maml:name> </dev:type> <maml:description> <maml:para>The Owner, Repository, and the names of labels that were Added, Updated, Removed, and Unchanged.</maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>This cmdlet requires the GitHub CLI (`gh`) to be installed and signed in (`gh auth login`) with permission to manage labels on the target repository.</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>--------- Example 1 - Sync labels using the stored default owner/repository ---------</maml:title> <maml:introduction> <maml:para>```powershell Set-GitHubLabels -LabelFilePath ./templates/github-labels.jsonc ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 2 - Preview changes without applying them ---------</maml:title> <maml:introduction> <maml:para>```powershell Set-GitHubLabels -LabelFilePath ./templates/github-labels.jsonc -Owner "myorg" -Repository "myrepo" -WhatIf ```</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> <command:example> <maml:title>--------- Example 3 - Sync labels without removing extras ---------</maml:title> <maml:introduction> <maml:para>```powershell Set-GitHubLabels -LabelFilePath ./templates/github-labels.jsonc -Owner "myorg" -Repository "myrepo" -KeepExistingLabels ```</maml:para> <maml:para>€</maml:para> <maml:para>Creates missing labels and updates changed ones, but leaves any repository labels that aren't listed in the file untouched instead of removing them.</maml:para> </maml:introduction> <dev:code /> <dev:remarks /> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version</maml:linkText> <maml:uri /> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |