src/Types/New-XrmDevOpsSettings.ps1
|
<# .SYNOPSIS Initialize new object that represent a DevOps Connection settings. .DESCRIPTION Core module cmdlet that create new object to store Azure DevOps information. .OUTPUTS PSCustomObject. Settings with empty OrganizationName, ProjectName and Token, read by Invoke-XrmDevOpsApi from $Global:XrmContext.CurrentConnection.DevOpsSettings. .EXAMPLE $devOpsSettings = New-XrmDevOpsSettings; $devOpsSettings.OrganizationName = "contoso"; $devOpsSettings.ProjectName = "CRM"; $devOpsSettings.Token = $personalAccessToken; $Global:XrmContext.CurrentConnection.DevOpsSettings = $devOpsSettings; .LINK https://github.com/AymericM78/PowerDataOps/blob/main/documentation/commands/New-XrmDevOpsSettings.md #> function New-XrmDevOpsSettings { [CmdletBinding()] [OutputType([PSCustomObject])] param ( ) begin { $StopWatch = [System.Diagnostics.Stopwatch]::StartNew(); Trace-XrmFunction -Name $MyInvocation.MyCommand.Name -Stage Start -Parameters ($MyInvocation.MyCommand.Parameters); } process { $hash = @{ }; $hash["OrganizationName"] = [String]::Empty; $hash["ProjectName"] = [String]::Empty; $hash["Token"] = [String]::Empty; $object = New-Object PsObject -Property $hash; $object; } end { $StopWatch.Stop(); Trace-XrmFunction -Name $MyInvocation.MyCommand.Name -Stage Stop -StopWatch $StopWatch; } } Export-ModuleMember -Function New-XrmDevOpsSettings -Alias *; |