< Back
Get-OMSWorkspace
Post
NAME Get-OMSWorkspace
SYNOPSIS
Get OMS Workspaces from Azure Subscription.
SYNTAX
Get-OMSWorkspace [-Token] <String> [-SubscriptionID] <String> [[-APIVersion] <String>] [<CommonParameters>]
Get-OMSWorkspace [-Token] <String> [-OMSConnection] <Object> [[-APIVersion] <String>] [<CommonParameters>]
DESCRIPTION
Get OMS Workspaces from Azure Subscription.
PARAMETERS
-Token <String>
Token aquired from Get-AADToken cmdlet.
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 microsoft.operationalinsights
Azure Resource provider.
Required? false
Position? 3
Default value 2015-03-20
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 workspace information.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-OMSWorkspace -SubscriptionId $Subscriptionid -Token $Token
Description
-----------
Gets all workspaces under Azure subscription by using Subscription ID
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-OMSWorkspace -SubscriptionId $Subscriptionid -Token $Token -APIVersion '2015-03-20'
Description
-----------
Gets all workspaces under Azure subscription by using Subscription ID
Uses specific version of Operational Insights API
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-OMSWorkspace -OMSConnection $OMSCon -Token $Token
Description
-----------
Gets all workspaces under Azure subscription by using information from asset of type connection in OMS Automation
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-OMSWorkspace -OMSConnection $OMSCon -Token $Token -APIVersion '2015-03-20'
Description
-----------
Gets all workspaces under Azure subscription by using information from asset of type connection in OMS Automation
Uses specific version of Operational Insights API
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
RELATED LINKS
SYNOPSIS
Get OMS Workspaces from Azure Subscription.
SYNTAX
Get-OMSWorkspace [-Token] <String> [-SubscriptionID] <String> [[-APIVersion] <String>] [<CommonParameters>]
Get-OMSWorkspace [-Token] <String> [-OMSConnection] <Object> [[-APIVersion] <String>] [<CommonParameters>]
DESCRIPTION
Get OMS Workspaces from Azure Subscription.
PARAMETERS
-Token <String>
Token aquired from Get-AADToken cmdlet.
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 microsoft.operationalinsights
Azure Resource provider.
Required? false
Position? 3
Default value 2015-03-20
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 workspace information.
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Get-OMSWorkspace -SubscriptionId $Subscriptionid -Token $Token
Description
-----------
Gets all workspaces under Azure subscription by using Subscription ID
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Get-OMSWorkspace -SubscriptionId $Subscriptionid -Token $Token -APIVersion '2015-03-20'
Description
-----------
Gets all workspaces under Azure subscription by using Subscription ID
Uses specific version of Operational Insights API
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$SubscriptionId = "3c1d68a5-4064-4522-94e4-e0378165555e"
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Get-OMSWorkspace -OMSConnection $OMSCon -Token $Token
Description
-----------
Gets all workspaces under Azure subscription by using information from asset of type connection in OMS Automation
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
-------------------------- EXAMPLE 4 --------------------------
PS C:\\>Get-OMSWorkspace -OMSConnection $OMSCon -Token $Token -APIVersion '2015-03-20'
Description
-----------
Gets all workspaces under Azure subscription by using information from asset of type connection in OMS Automation
Uses specific version of Operational Insights API
Example Variables
-----------------
$OMSCon = Get-AutomationConnection -Name 'OMSCon'
$Token = Get-AADToken -OMSConnection $OMSCon
RELATED LINKS