Post Installation ## This is a PS script to Perform the Post-Installation steps on 2012\14 ## Developer ## ## $ErrorActionPreference = "SilentlyContinue" #$M = read-host -prompt "Please enter the machine name: " $I = read-host -prompt "Please enter the full instance name eg., clwtd4000\SQL2008INS3: " $yes = New-Object System.Management.Automation.Host.ChoiceDescription "&yes","" $no = New-Object System.Management.Automation.Host.ChoiceDescription "&no","" $choices = [System.Management.Automation.Host.ChoiceDescription[]]($yes,$no) $caption = "Scom install" $message = "is this server prod?" $result = $Host.UI.PromptForChoice($caption,$message,$choices,0) [System.Reflection.Assembly]::LoadWithPartialName(‘Microsoft.SqlServer.SMO’) | out-null $login = New-Object -TypeName Microsoft.SqlServer.Management.Smo.Login -ArgumentList $I, 'ad-ent\prv_edm_fa_srv_sqlservic...
Posts
Showing posts from 2016
- Get link
- X
- Other Apps
Powershell - M plan Add-Type -AssemblyName System.Windows.Forms $form = New-Object Windows.Forms.Form $form.Size = New-Object Drawing.Size @(700,500) $form.StartPosition = "CenterScreen" $objLabel = New-Object System.Windows.Forms.Label $objLabel.Location = New-Object System.Drawing.Size(10,20) $objLabel.Size = New-Object System.Drawing.Size(300,30) $objLabel.Text = "Enter Full Instance Name(CLWTD4000\Instance01)" $form.controls.Add($objLabel) $objInsBox = New-Object System.Windows.Forms.TextBox $objInsBox.Multiline = $true $objInsBox.Location = New-Object System.Drawing.Size(305,20) $objInsBox.Size = New-Object System.Drawing.Size(330,20) $form.controls.Add($objInsBox) $drives = Get-WmiObject -Class Win32_Volume | Where-Object {$_.FreeSpace -gt 1073741824} #Get Drive Information Foreach ($drive in $drives) { $rootdrive = ($drive.Caption).TrimEnd("\") If ($rootdrive -ne "C:" -and $AvailDrives -...
- Get link
- X
- Other Apps
Maintenacne Plan creation USE [msdb] GO DECLARE @sqlInstance varchar(20) SET @sqlInstance = '$(instanceName)' DECLARE @BackUpSubPlan sysname SET @BackUpSubPlan = 'Back Up Database Task' DECLARE @BackUpJobName sysname SET @BackUpJobName = 'System databases.' + @BackUpSubPlan DECLARE @ChkDbSubPlan sysname SET @ChkDbSubPlan = 'Check Database Integrity Task' DECLARE @ChkDbJobName sysname SET @ChkDbJobName = 'System databases.' + @ChkDbSubPlan DECLARE @RebuildIndexSubPlan sysname SET @RebuildIndexSubPlan = 'Rebuild Index Task' DECLARE @RebuildIndexJobName sysname SET @RebuildIndexJobName = 'System databases.' + @RebuildIndexSubPlan DECLARE @UpdStatsSubPlan sysname SET @UpdStatsSubPlan = 'Update Statistics Task' DECLARE @UpdStatsJobName sysname SET @UpdStatsJobName = 'System databases.' + @UpdStatsSubPlan DECLARE @HistClnSubPlan sysname SET @HistClnSubPlan = 'History Cleanup Task' ...
- Get link
- X
- Other Apps
<# .SYNOPSIS The purpose of this script is to gather details from the DBA installer to customize their SQL Server install. This script will produce a configuration ini file and will launch a SQL Server silent Install. After the silent instal, a basic check is done to ensure the new instance is created. If the new instance exists, the port number is changed from dynamic to static, firewall rules are updated with the new port information, sa account is disabled, and the polkj11 account is created. .DESCRIPTION This script will gather the following information: 1.) Named or Default instance 2.) SQL Server Service Account Name 3.) SQL Server Service Account Password 4.) SQL Agent Service Account Name 5.) SQL Agent Service Account Password 6.) Integrated SErvices Service Account Name 7.) Integrated Service Service Account Password 8.) Alternate SA account Name 9.) SA / Alternate SA Password 10.) DBA Privileged Group ...