Archive for 2011

Checking Disk alignment with Powershell

Disk alignment has been well discussed on the web and the methods to check this always seem to use wmic or DISKPART. I’ve always loathed wmi so here’s a few lines of Powershell that achieves the same thing; ?View Code POWERSHELL$sqlserver = "sqlinstance"; # Get disk partitions $partitions = Get-WmiObject -ComputerName $sqlserver -Class Win32_DiskPartition; $partitions […]

Audit VLFs on your SQL Server

I’ve been reading a bit about VLFs (Virtual Log Files) this week. I’ve found quite a few interesting links, especially this one, informing us that there’s such a thing as too few or too many VLFs. We can view details about VLFs using the DBCC LOGINFO TSQL command. This only works against the current database […]

Tweet-SQL 3.5 Released

Tweet-SQL 3.5 is now available. This release features better methods for using multiple Twitter accounts and https support. Download your copy over on tweet-sql.com. There’s a few exciting blog posts coming up including "The AdventureWorks of Tweet-SQL" and "Twitter bots with Tweet-SQL". In the meantime checkout the following blog posts… MULTIPLE TWITTER ACCOUNTS WITH TWEET-SQL […]

Fun with the Get-Hotfix cmdlet

With the Get-Hotfix cmdlet you can query the list of hotfixes that have been applied to computers. ?View Code POWERSHELLGet-Hotfix | Format-Table -AutoSize; This will display the list of hotfixes installed on the local computer. Source Description HotFixID InstalledBy InstalledOn —— ———– ——– ———– ———– SO0590 Update 982861 NT AUTHORITY\SYSTEM 07/07/2011 00:00:00 SO0590 Update KB958830 […]

Fun with the Get-EventLog cmdlet

The Get-EventLog cmdlet is great for working with the Windows Event Logs on local and remote computers. It includes lots of parameters that make life much easier than using the Event Viewer GUI. To list the available logs on the local computer just execute; ?View Code POWERSHELLGet-EventLog -List | Format-Table -AutoSize; Max(K) Retain OverflowAction Entries […]