Functions/New-IADataDefinitionObject.ps1
Function New-IADataDefinitionObject{ Param( [Parameter(Mandatory = $true)] [Guid]$IATaskScheduleId, [Parameter(Mandatory = $true)] [Guid]$IAConnectorModuleId, $IAWidgetConfiguration ) $cultureEnUs = New-Object System.Globalization.CultureInfo("en-US") $sqlDateTime = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.000Z", $cultureEnUs) $IADataDefinitionObject = New-Object -TypeName PSObject $IADataDefinitionObject | Add-Member -MemberType NoteProperty -Name 'ConnectorModuleId' -Value $IAConnectorModuleId $IADataDefinitionObject | Add-Member -MemberType NoteProperty -Name 'TaskScheduleId' -Value $IATaskScheduleId $IADataDefinitionObject | Add-Member -MemberType NoteProperty -Name 'Configuration' -Value $IAWidgetConfiguration $IADataDefinitionObject | Add-Member -MemberType NoteProperty -Name 'NextRun' -Value $sqlDateTime return $IADataDefinitionObject } |