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
cls | |
get-date | |
Import-Module AssistDeploy -Force | |
$thisSsisPublishFilePath = "C:\Users\SQLTraining\Documents\bob.json" | |
$thisIspacToDeploy = "C:\Users\SQLTraining\Downloads\sql-server-samples-master\sql-server-samples-master\samples\databases\wide-world-importers\wwi-ssis\wwi-ssis\bin\Development\Daily ETL.ispac" | |
$svr = "Server=.\hh;Integrated Security=True" | |
$myJsonPublishProfile = Import-Json -jsonPath $thisSsisPublishFilePath -ispacPath $thisIspacToDeploy -localVariables | |
$ssisdb = Connect-SsisdbSql -sqlConnectionString $svr | |
Publish-SsisFolder -jsonPsCustomObject $myJsonPublishProfile -sqlConnection $ssisdb | |
Publish-SsisEnvironment -jsonPsCustomObject $myJsonPublishProfile -sqlConnection $ssisdb |
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
#requires -version 5.1 | |
Function Get-AVStatus { | |
<# | |
.Synopsis | |
Get anti-virus product information. | |
.Description | |
This command uses WMI via the Get-CimInstance command to query the state of installed anti-virus products. The default behavior is to only display enabled products, unless you use -All. You can query by computername or existing CIMSessions. | |
.Example |
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
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | out-null | |
$server = New-Object ("Microsoft.SqlServer.Management.Smo.Server") "localhost" | |
$databases = $server.Databases; | |
foreach ($db in $databases ) { | |
#Set Log File growth | |
if ($db.Status -eq 'Normal' -and -$db.IsSystemObject -eq $false) { | |
$l = $db.LogFiles[0] | |
$l.GrowthType = "KB" | |
$l.Growth = "51200" | |
$l.Alter(); |
NewerOlder