VConnectSqlDb.psm1

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

# Instal Pre-Req Modules

Invoke-InstallOrUpdateModule 'SqlServer'

function Get-VConnectDbDeployments {
    param($name, $dbName, [int] $top = 100) 
    $query = "SELECT TOP ($top) [DeploymentId]
      ,[DeploymentName]
      ,[OwnerId]
      ,[OwnerEmailId]
      ,[StatusString]
      ,[Status]
      ,[Message]
      ,[Exception]
      ,[CreatedOn]
      ,[StartTime]
      ,[CompletedTime]
      ,[AssignedAgentId]
      ,[ResourceId]
      ,[ResourceType]
      ,[ResourceName]
      ,[DeploymentRequestId]
      ,[UpdatedTime]
  FROM [dbo].[Deployments]"


  Invoke-SqlDbQuery $name $query $dbName

}