Created
October 26, 2017 09:43
-
-
Save Staggerlee011/4a339dcce8224b2f94676e8735b6061c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$env:ServerName = "MyServer" | |
$env:JenkinsUser = "domain\login" | |
$env:JenkinsPassword = "SuperSecretPassword" | |
## Ivoke OS Pester test output to OSreport.xml | |
Invoke-Pester -Script @{Path ='C:\GIT\DBA\Build\Pester\SQL Server OS.test.ps1'; Parameters = @{ServerName = $($env:ServerName); JenkinsUser = $($env:JenkinsUser) ; JenkinsPassword = $($env:JenkinsPassword)}} -OutputFile OSreport.xml -OutputFormat NUnitXml | |
## Push data into SQL Server via DBATools | |
$output = Parse-PesterXML -XMLFile ./OSreport.xml -Server $env:ServerName | Out-DbaDataTable | |
Write-DbaDataTable -SqlServer PRD-SQL-INT01 -InputObject $output -Table admin.dbo.pesterresults -AutoCreateTable |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment