tests/New-AzureOMSSavedSearchCollection.ps1

#increment int for search id
# read in data from json (convert the csv used for testing)
# params for resourcegroupname, category (each node will have a unique alert under it), workspacename,

function New-AzureOMSSavedSearchCollection {
    [CmdletBinding()]

    Param (
    
        [Parameter(Mandatory=$true)]
        [string]$subscriptionname,

        [Parameter(Mandatory=$true)]
        [string]$OMSResourceGroupName,

        [Parameter(Mandatory=$true)]
        [string]$jsonobject,

        [Parameter()]
        [string]$nodename

    )

    Process 
    {
    
        # check to see if local token exists (ran Login-AzureRMAccount)
        if (($null -eq (Get-AzureRmContext).Account)) {
            Write-Warning "Please run < Login-AzureRMAccount > first to create a session token...exiting."
            break
        } 

        Try {
            Select-AzureRmSubscription -SubscriptionName $subscriptionname -ErrorAction Stop -Verbose | Out-Null
        }
        Catch {
            $error[0].Exception
            break
        }

        <#
        $deleteme = New-AzureRmOperationalInsightsSavedSearch -DisplayName 'testing alert' -ResourceGroupName 'Attunix-OMS' -WorkspaceName 'Attunix-MSP-ProStar-LiftnShift' -Category 'test category' -Query '*' -Verbose -Version 1
        #>

    
    }
}