File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -606,6 +606,46 @@ function Get-AzsBackup {
606606
607607Export-ModuleMember - Function Get-AzsBackup
608608
609+ <#
610+ . SYNOPSIS
611+ Set Azure Stack geographic location information
612+ #>
613+
614+ function Set-AzSLocationInformation {
615+ param (
616+ [Parameter (Mandatory = $false )]
617+ [string ] $Location ,
618+
619+ [Parameter (Mandatory = $true )]
620+ [string ] $Latitude = ' 47.608013' ,
621+
622+ [Parameter (Mandatory = $true )]
623+ [string ] $Longitude = ' -122.335167'
624+ )
625+
626+ $Location = Get-AzsHomeLocation - Location $Location
627+
628+ $resourceType = " Microsoft.Subscriptions.Admin/locations"
629+ $apiVersion = " 2015-11-01"
630+
631+ $locationResource = Get-AzureRmResource - ResourceType $resourceType - ResourceName $Location - ApiVersion $apiVersion
632+
633+ $params = @ {
634+ ResourceName = $Location
635+ ResourceType = $resourceType
636+ ApiVersion = $apiVersion
637+ Properties = @ {
638+ Id = $locationResource.ResourceId
639+ Name = $locationResource.Name
640+ DisplayName = $locationResource.Name
641+ Latitude = $Latitude
642+ Longitude = $Longitude
643+ }
644+ }
645+
646+ New-AzureRmResource @params - IsFullObject - Force
647+ }
648+
609649function Get-AzsHomeLocation {
610650 param (
611651 [Parameter (Mandatory = $false )]
You can’t perform that action at this time.
0 commit comments