$ComputerName = @"
itddmrdbmssqlu1.nd.gov
itddmrdbmssqld1.nd.gov
itddmrdbmsu1.nd.gov
itddmrdbmsd1.nd.gov
"@

$ComputerName = ConvertTo-Array -MultiLineString $ComputerName

Invoke-Command -Credential $PrvCred -ComputerName $ComputerName -ScriptBlock {
    Get-Process -Name ccmexec, cohesity*, nessus*, cortex*, vmware*
} | Sort-Object PSComputerName

<#
# Add to Solarwinds
$Func = {
    param($ComputerName)
    Import-SWDiscovery -ComputerName $ComputerName -Integration ServiceNow
}
ForEach ($c in $ComputerName) {
    #Invoke-Command -ComputerName itdslrwnds.nd.gov -ScriptBlock $Func -ArgumentList $c -Credential $IaaSAuto
}

# Validate Solarwinds node creation
$Func = {
    param($ComputerName)
    $test = Get-SWNode -ComputerName $ComputerName
    If ($test) { “Pass” }
}
ForEach ($c in $ComputerName) {
    
    Invoke-Command -ComputerName itdslrwnds.nd.gov -ScriptBlock $Func -ArgumentList $c -Credential $IaaSAuto
}

Invoke-Command -ComputerName itdsccmp2.nd.gov -ScriptBlock { Get-Process } -Credential $PrvCred
#>

$SCTaskNums = @"
SCTASK0173131
SCTASK0173136
"@

$SCTaskNums = ConvertTo-Array -MultiLineString $SCTaskNums
$SCTaskNums | ForEach-Object { Approve-ITDVMNewBuild -SCTaskNum $_ }

