private/get/Get-ConnectionProfile.ps1
function Get-ConnectionProfile { [CmdletBinding(PositionalBinding = $true)] param() $awsRegion = (Get-EC2AvailabilityZone)[0].RegionName $awsIdentity = Get-STSCallerIdentity return [pscustomobject]@{ Account = $awsIdentity.Account UserArn = $awsIdentity.Arn UserId = $awsIdentity.UserId Region = $awsRegion } } |