< Back
Get-OMSResourceGroup
Post
NAME Get-OMSResourceGroup
SYNOPSIS
Get Azure Resource Group where there is OMS
workspace resource.
The cmdlet assumes that your OMS resource Groups
has 'OI-Default-' in its name. This cmdlet is
scheduled to be depricated.
SYNTAX
Get-OMSResourceGroup [-Token] <String> [-SubscriptionID] <String> [[-APIVersion] <String>] [<CommonParameters>]
Get-OMSResourceGroup [-Token] <String> [-OMSConnection] <Object> [[-APIVersion] <String>] [<CommonParameters>]
DESCRIPTION
Get Azure Resource Group where there is OMS
workspace resource. The cmdlet assumes that your OMS resource Groups
has 'OI-Default-' in its name.
PARAMETERS
-Token <String>
Token aquired from Get-AADToken cmdlet.
Token must be aquired with account that has
access to all resource groups in the Azure
subscription.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SubscriptionID <String>
Azure Subscription ID where the OMS workspace
is located.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OMSConnection <Object>
Object that contains all needed parameters for working
with OMSSearch Module. You can create such object in
OMS Automation as connection asset.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-APIVersion <String>
Api version for Azure subscriptions provider.
Required? false
Position? 3
Default value 2014-04-01
Accept pipeline input? false
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
OUTPUTS
System.Object. Returns array of objects. Each object
is OMS resoure group information.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -SubscriptionId $Subscriptionid -Token $Token
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -SubscriptionId $Subscriptionid -Token $Token -APIVersion '2014-04-01'
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -OMSConnection $OMSCon -Token $Token
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -OMSConnection $OMSCon -Token $Token -APIVersion '2014-04-01'
RELATED LINKS
SYNOPSIS
Get Azure Resource Group where there is OMS
workspace resource.
The cmdlet assumes that your OMS resource Groups
has 'OI-Default-' in its name. This cmdlet is
scheduled to be depricated.
SYNTAX
Get-OMSResourceGroup [-Token] <String> [-SubscriptionID] <String> [[-APIVersion] <String>] [<CommonParameters>]
Get-OMSResourceGroup [-Token] <String> [-OMSConnection] <Object> [[-APIVersion] <String>] [<CommonParameters>]
DESCRIPTION
Get Azure Resource Group where there is OMS
workspace resource. The cmdlet assumes that your OMS resource Groups
has 'OI-Default-' in its name.
PARAMETERS
-Token <String>
Token aquired from Get-AADToken cmdlet.
Token must be aquired with account that has
access to all resource groups in the Azure
subscription.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-SubscriptionID <String>
Azure Subscription ID where the OMS workspace
is located.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-OMSConnection <Object>
Object that contains all needed parameters for working
with OMSSearch Module. You can create such object in
OMS Automation as connection asset.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-APIVersion <String>
Api version for Azure subscriptions provider.
Required? false
Position? 3
Default value 2014-04-01
Accept pipeline input? false
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
OUTPUTS
System.Object. Returns array of objects. Each object
is OMS resoure group information.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -SubscriptionId $Subscriptionid -Token $Token
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -SubscriptionId $Subscriptionid -Token $Token -APIVersion '2014-04-01'
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -OMSConnection $OMSCon -Token $Token
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>$Token = Get-AADToken -OMSConnection $OMSCon
Get-OMSResourceGroup -OMSConnection $OMSCon -Token $Token -APIVersion '2014-04-01'
RELATED LINKS