Posts

Showing posts from August, 2019

Cluster/AOA script continued

I have done some more scripting related to building AOA etc in our environment. May be useful for someone. I admit it could be a bit cleaner etc but should work for helping others facing a truly automated build. I am sure I could change the Read-host entries to parameters/variables if we were going to use SCCM or something to deploy, but we are not quite there yet in my environment, unfortunately. Note: I have updated the script some more to create variables for the instance name etc add some error handling, but the basic function is the same as what is posted below. ###################################################################################### #######variables to modify as needed $path="C:\temp\SQLClusterInstall" #Log File Location $DomainSQLAcct ="somedomain\acct" $BackupShare="G:\Backups" #Set Policy Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass ################################################################## ## Cre
FSRM and setting quotas with PowerShell Scripts I am not going to go into how to do it only that for Powershell scripts that use FSRM cmdlets to work it appears you need to reboot twice! We were running a hardening script on some SQL boxes and part of the script installs FSRM if it's not already there. So after it installs it often needs a reboot again no big deal reboot run the script again.... well we try to run the script and no matter what it says the FSRM commands are not there. So we open up the Powershell ISE we can even see the cmdlets in the ISE...huh weird we tried a few different things and then headed off to Google after nothing else worked. I found one obscure post from an Azure board where the guy had to reboot twice.... I thought no way, but why not since we did not have any other ideas....TADA! Script ran fine ...seriously F you Microsoft.... You cost me some more hours of my life.... so I guess the lesson of the day is if you can't figure out why something th

A little powershell help for a cluster build

Image
I am tasked with automating a cluster build for use by our field folks as much as possible. One of the issues I hit was that while there was a way to use Test-Cluster to run the report all the posts I found involved manually looking over it before moving on to the build. This may not be the best way to handle it, but it seems to be functional and might help someone else. I am not sure what all messages can come back in the report that someone may want to use for different operations, but this works for my purposes. Further in the script if the if statement was true it then prompts the user for the cluster name and IP and then runs the new-cluster powershell cmdlet.