tag:blogger.com,1999:blog-200140072024-03-18T21:05:35.952-06:00Lars Rasmussen - @nanoDBALars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.comBlogger100125tag:blogger.com,1999:blog-20014007.post-16770218909433367382022-03-24T14:50:00.001-06:002022-03-24T14:52:33.642-06:00dbatools: Using default credential for certain functions and parameters<div style="background-color: #292d3e; color: #a6accd; font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre;"><div><span style="color: #676e95; font-style: italic;"><# assign a credential to variable named $sqlCred #>
</span><span style="color: #89ddff;">$</span>sqlCred <span style="color: #89ddff;">=</span> <span style="color: #82aaff;">Get-Credential</span> someUsername</div><br /><div><span style="color: #676e95; font-style: italic;"><# use cred $sqlCred by default when calling functions with
specific names( *-Dba* )
and </span><span style="color: #676e95; font-style: italic;">three named parameters:</span></div><div><span style="color: #676e95; font-style: italic;"> </span></div><div><span style="color: #676e95; font-style: italic;"> -SqlCredential</span></div><div><span style="color: #676e95; font-style: italic;"> -SourceSqlCredential</span></div><div><span style="color: #676e95; font-style: italic;"> -DestinationSqlCredential</span></div><br /><div><span style="color: #676e95; font-style: italic;">#></span></div><div><span style="color: #89ddff;">$</span>PSDefaultParameterValues<span style="color: #89ddff;">[</span><span style="color: #89ddff;">'</span><span style="color: #c3e88d;">*-Dba*:SqlCredential</span><span style="color: #89ddff;">'</span><span style="color: #89ddff;">]</span> <span style="color: #89ddff;">=</span> <span style="color: #89ddff;">$</span>sqlCred</div><div><span style="color: #89ddff;">$</span>PSDefaultParameterValues<span style="color: #89ddff;">[</span><span style="color: #89ddff;">'</span><span style="color: #c3e88d;">*-Dba*:SourceSqlCredential</span><span style="color: #89ddff;">'</span><span style="color: #89ddff;">]</span> <span style="color: #89ddff;">=</span> <span style="color: #89ddff;">$</span>sqlCred</div><div><span style="color: #89ddff;">$</span>PSDefaultParameterValues<span style="color: #89ddff;">[</span><span style="color: #89ddff;">'</span><span style="color: #c3e88d;">*-Dba*:DestinationSqlCredential</span><span style="color: #89ddff;">'</span><span style="color: #89ddff;">]</span> <span style="color: #89ddff;">=</span> <span style="color: #89ddff;">$</span>sqlCred</div><div><br /></div><p style="text-align: left;">#Ideas mostly stolen from <a href="https://dbatools.io/defaults/">https://dbatools.io/defaults/</a></p></div>Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-42401250993156703802021-03-22T11:47:00.001-06:002021-03-22T11:51:26.631-06:00Deleting Data and Log Files Not In Use with Find-DbaOrphanedFile (dbatools)<p>Over the weekend I was paged because a SQL Server volume violated a 5% minimum free disk space threshold set by our alerting system on storage volumes.  This time additional storage had previously been requested but had not yet been provisioned.  After going down the <strong>often unwise rabbit hole of shrinking one data file</strong> by only 3.91GB and afterward running Ola’s <a href="https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html" target="_blank">IndexOptimize</a> to clean up the resulting fragmentation, a previously used cmdlet from the <a href="https://dbatools.io/" target="_blank">dbatools PowerShell module</a> popped into my head – with a little help from <a href="https://serverfault.com/questions/891265/how-to-search-powershell-command-history-from-previous-sessions/991256#991256" target="_blank">PSReadLine’s CTRL+R to search through my command line history</a>... <br /><a href="https://drive.google.com/uc?id=1QBCdqxJKOsIZG89K8KYYXYy9zNF4h3-1"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=1ZzMNkq98mOJdoM6M3SYx1hmtc_ScwyFF" width="500" height="33" /></a> <p>Found it! <br /><font face="Courier New">Find-DbaOrphanedFile</font> <br /> <br />I ran this command and quickly found 5 data files on the volume that were not in use - candidates for deletion - along with their corresponding transaction log files on another volume: <br /><a href="https://drive.google.com/uc?id=1NfXzD0fWSWXssXgF8X0jpyW_gAQLeObi"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=1313SxzcgYBGuts_c1lzG_3NTh4lzSQ1C" width="500" height="273" /></a> <p><strong>Caution:</strong> None of those “Are you sure you wish to delete this file?(Y/N)” safety prompts here… <br /> <br />Let’s dangerously pipe that to <font face="Courier New">Remove-Item</font> and poof!  The files have been deleted.  </p> </p> </p> <p>Before: <br /><a href="https://drive.google.com/uc?id=185xNrpbVWLr7axPoMniM22PpktqLPYZj"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=17kvHKtus4IFX97uPmsbBuynORPZlyP9_" width="500" height="92" /></a> <p>Running the command to <strong>delete</strong> the orphaned MDF/NDF/LDF files… <br /><a href="https://drive.google.com/uc?id=10u-D4vtN1LKmTuDow6IPm3MwbmDg1g8w"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=1dALkJL3t_TAVB6DjIbQYcJFKlt61zh0p" width="500" height="42" /></a></p> <p>After: <br /><a href="https://drive.google.com/uc?id=1qOUrDvJAExQSvU7b344B3MfR_Il1BUSR"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=19a3rfxAKEpuaCQMUs2BoANEWC23kieiM" width="500" height="91" /></a> <p>Nearly 10GB freed from one volume in a single line.  Nice.  And no fragmented indexes to think about, either.</p> </p> </p> <p><font face="Courier New">Get-Help Find-DbaOrphanedFile -ShowWindow</font> <br />offers an explanation of what the <font face="Courier New"><strong>Find-DbaOrphanedFile</strong></font> cmdlet does: <br /><a href="https://drive.google.com/uc?id=1rCODczB7gC5EjG6GdgtcP9RQgTK9iEWB"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=1wVZaHx0oKr1LirdpKgeq6CI0l6jUDMtS" width="500" height="344" /></a> <p>I typically run <font face="Courier New">Find-DbaOrphanedFile</font> with the <font face="Courier New">-RemoteOnly</font>  switch to display UNCs.</p>  Running <br /><font face="Courier New">Get-Help Find-DbaOrphanedFile -Examples</font> <br />will offer some helpful examples. <br /> <br />It took me while to find out how to group the results in PowerShell to display the sum of the size of all orphaned files in a given directory, but <a href="https://jesspomfret.com/powershell-aggregation/" target="_blank">this post from Jess Pomfret</a> put it together for me.</p> <p><font face="Courier New">Find-DbaOrphanedFile -SqlInstance localhost -RemoteOnly | <br /> Get-Item | <br /> Select-Object FullName, Directory, Length | <br /> Group-Object Directory | <br /> Select Name, @{Label='SizeGB';Expression={ ($_.Group.Length | Measure-Object -Sum).Sum/1GB }} <br /><a href="https://drive.google.com/uc?id=1DLpQzoYBCfFo7sW93UGnhdTQlrUhDzrr"><img title="image" style="border: 0px currentcolor; display: inline; background-image: none;" border="0" alt="image" src="https://drive.google.com/uc?id=1Rs3V4-AHb0P4FREaXOIB92X3IkqSEZJy" width="500" height="113" /></a> </font></p>Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-31592876915017406012020-12-11T11:28:00.001-07:002020-12-14T08:42:21.353-07:00Impersonating an Application Name Using Connect-DbaInstance<p>Disclaimer: While writing this post I finally scrolled down a little further and read the <a href="https://dbatools.io/track-logins/#gist88822261" target="_blank">‘Testing your results’ portion of Chrissy LeMaire’s post</a>, which uses that same<font face="Courier New"> ClientName</font> parameter, making most of this post redundant.  That would have saved me some time if I hadn’t skimmed past it for over 2.5 years!  Discovering functionality within the dbatools module from the console is very rewarding, though. <br /></p> <hr /> <br />I'm trying to decommission a SQL Server so I'm monitoring logins to that SQL instance, to ensure it isn’t being used. However, the customized version of the script to monitor logins using <a href="https://dbatools.io/track-logins/#gist88877639" target="_blank">Chrissy’s backwards-compatible T-SQL and the dbatools module</a> excludes connections from certain apps (our performance monitoring software and dbatools connections, and certain domain credentials) from being logged, which made it problematic to test the monitoring to see if the connections were being written to the <font face="Courier New">watchlogins</font> table. <p>Using the <font face="Courier New">Connect-DbaInstance</font> cmdlet I can impersonate another account _and_ impersonate an application name, verifying that the monitoring script is inserting the desired connections into the <font face="Courier New">watchlogins</font> table.  The <font face="Courier New">SqlCredential</font> parameter allows Windows logons or SQL logins to be used.  The example below uses a domain logon stored in the <font face="Courier New">$cred</font> variable as a PSCredential object.  The <font face="Courier New">ClientName</font> parameter is where the “fake” client application name is specified.  Using a <a href="https://docs.microsoft.com/en-us/sql/t-sql/language-elements/waitfor-transact-sql" target="_blank">WAITFOR DELAY</a> statement ensured the connection was active long enough for the polling from the collection script to catch it. <br /></p> <script src="https://gist.github.com/nanoDBA/c5b7bf8ed812abda5e22d613013e9f5d.js"></script> <p><font face="Courier New"><font face="Arial">In the screenshot below the client name is displayed in the</font> program_name <font face="Arial">column of <a href="http://dataeducation.com/about/" target="_blank">Adam Machanic</a>’s</font> <a href="http://whoisactive.com/" target="_blank">sp_WhoIsActive</a> </font><font face="Arial">results in SQL Server Management Studio.</font></p> <div class="separator" style="clear: both;"><a style="padding: 1em 0px; text-align: center; display: block;" href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtX6JibSxKEhTg5P__4UsQBkxVsiGHr-f3dQtZOxISxIW2-PpL9xJ3yFgIrZ0KqSZyWIHxepGnSzaO3z0-p31fMKtefb1MS3-BNmUEfRJsHoiXNW9EoQBcB-G_wV2z_-FH8sfE/s2433/2020-12-10_18-13-26_Connect-DbaInstance.png"><img border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtX6JibSxKEhTg5P__4UsQBkxVsiGHr-f3dQtZOxISxIW2-PpL9xJ3yFgIrZ0KqSZyWIHxepGnSzaO3z0-p31fMKtefb1MS3-BNmUEfRJsHoiXNW9EoQBcB-G_wV2z_-FH8sfE/s320/2020-12-10_18-13-26_Connect-DbaInstance.png" width="320" data-original-height="544" data-original-width="2433" /></a></div> <p>See <code>Get-Help Connect-DbaInstance -Full</code> or <a href="https://dbatools.io/Connect-DbaInstance" target="_blank">https://dbatools.io/Connect-DbaInstance</a> for more info/examples.</p> <p>I’ve modified Chrissy’s script slightly to avoid running the query against instances that may be down and time out, as well as adding some output that can be seen when looking at job history when <a href="https://dbatools.io/agent/" target="_blank">scheduling the PowerShell job using SQL Agent</a>. <br /> <script src="https://gist.github.com/nanoDBA/80c8deb7253d0989fa9a7504ab066903.js"></script></p>Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-80643041682523960502019-06-22T09:35:00.001-06:002019-06-22T09:35:03.370-06:00Gospel Video Teaching Using VLC with Timestamped Playback for ClipsWhen teaching or facilitating a discussion I have found it challenging to use a video clip without losing momentum and/or causing unnecessary distraction from the lesson being taught.<br />
Ideally, video and audio clips should increase the Spirit of the Lord when used. I've found that having clips previously downloaded and queued helps solve this challenge.<br />
<br />
In order to create a playlist file in this manner you'll need VLC and a text editor. You'll also need to have the media file(s) downloaded and saved in the same directory/folder as the playlist M3U file.<br />
<br />
I've downloaded a <a href="https://mediasrv.lds.org/media-services/GA/size/6023650240001/640/360/995000">video file</a> from the <a href="https://www.churchofjesuschrist.org/study/general-conference/2019/04/54bednar?lang=eng">April 2019 General Conference address given by a member of the Quorum of the Twelve Apostles, Elder Bednar</a>, saving it as filename<br />
<br />
<span style="font-family: Courier New, Courier, monospace;">20190454bednar.mp4</span><br />
<br />
I've created a text file called<br /><span style="font-family: Courier New, Courier, monospace;">2019-06-23_Temple_and_Family_History_Lessson.m3u</span><br />in the same folder:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknAqAcuLVuA0H7L8eWbgNQq-eWW0VwU1RU9JLtwQR3WzMoir4mao-96nVEUHnmh9JAaWoINrd8RVTM8xaX0mVq3jgO_YQ7ICisiQXDO2iVv9qbWxHzpaSvV7Jq4vDIJO02MQY/s1600/2019-06-22_11-09-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="574" data-original-width="1581" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhknAqAcuLVuA0H7L8eWbgNQq-eWW0VwU1RU9JLtwQR3WzMoir4mao-96nVEUHnmh9JAaWoINrd8RVTM8xaX0mVq3jgO_YQ7ICisiQXDO2iVv9qbWxHzpaSvV7Jq4vDIJO02MQY/s400/2019-06-22_11-09-04.png" width="400" /></a></div>
There are 4 "clips" or portions of the video I would like to share during the lesson. By converting the playback timestamp from minutes:seconds to seconds I've come up with the following stop and start timestamps:<br /><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:start-time=945</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:stop-time=965</span><br />
<span style="font-family: Courier New, Courier, monospace;">20190454bednar.mp4</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:start-time=307</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:stop-time=396</span><br />
<span style="font-family: Courier New, Courier, monospace;">20190454bednar.mp4</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:start-time=462</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:stop-time=512</span><br />
<span style="font-family: Courier New, Courier, monospace;">20190454bednar.mp4</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:start-time=603</span><br />
<span style="font-family: Courier New, Courier, monospace;">#EXTVLCOPT:stop-time=806</span><br />
<span style="font-family: Courier New, Courier, monospace;">20190454bednar.mp4</span><br />
<br />
The above is the content of the <br /><span style="font-family: "Courier New", Courier, monospace;">2019-06-23_Temple_and_Family_History_Lessson.m3u</span><br />file.<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYdKzjvhXhxTCqbEKRq9urfPab5v5b0AreHgRJcIJTi51LZ9xRvjU3xozhHUE3eNbPP262asbPTlJ5ROV_h6z3pwLvqGFcJ-qnxfZfXoHtk-d-Q-ZxqLyAK1otQ3XITNbf6geR/s1600/2019-06-22_11-23-33.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1304" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYdKzjvhXhxTCqbEKRq9urfPab5v5b0AreHgRJcIJTi51LZ9xRvjU3xozhHUE3eNbPP262asbPTlJ5ROV_h6z3pwLvqGFcJ-qnxfZfXoHtk-d-Q-ZxqLyAK1otQ3XITNbf6geR/s320/2019-06-22_11-23-33.png" width="260" /></a>VLC allows playback to be paused and played using the spacebar key by default. To jump between clips (N)ext and (P)revious can be used (the letters N and P on the keyboard).<br />
<br />
Double-clicking the file<br /><span style="font-family: "Courier New", Courier, monospace;">2019-06-23_Temple_and_Family_History_Lessson.m3u</span>will launch VLC using the playlist of clips using the timestamps specified.<br /><br />The VLC interface can be further customized via <b>Tools >> Preferences </b>to play full screen by default to minimize distraction. <br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0KK1bZ_8ROuzdRKPRJfqF9aVLykUEXjYBsdpvr6_h1bMYJFC4fXDZkDsbaRwvjdQiCNECp4wCbGThuu3P9h6f7vKcJl5Uj5anX1L180aNGLECD2IvPsoyNO_AojzGpPVS4GOf/s1600/2019-06-22_11-24-00_playlist_prefs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" data-original-height="1600" data-original-width="1304" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0KK1bZ_8ROuzdRKPRJfqF9aVLykUEXjYBsdpvr6_h1bMYJFC4fXDZkDsbaRwvjdQiCNECp4wCbGThuu3P9h6f7vKcJl5Uj5anX1L180aNGLECD2IvPsoyNO_AojzGpPVS4GOf/s320/2019-06-22_11-24-00_playlist_prefs.png" width="260" /></a><br />VLC can also launch paused by default.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCCNaQd2Xfrzq_9t65vAjtweKOh6Ky6YuO617XOOgbUoe2gwDs3okf8qF2mkXo_ngL0PP5O_vHuFRR4KSBKGzlSnGADpavdimd7omuvwnVtSU3i0wPfN-LiGnYMBh1g4XuftPA/s1600/2019-06-22_11-21-04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="836" data-original-width="1600" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCCNaQd2Xfrzq_9t65vAjtweKOh6Ky6YuO617XOOgbUoe2gwDs3okf8qF2mkXo_ngL0PP5O_vHuFRR4KSBKGzlSnGADpavdimd7omuvwnVtSU3i0wPfN-LiGnYMBh1g4XuftPA/s320/2019-06-22_11-21-04.png" width="320" /></a></div>
<br />
<br />Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-59110298731086012942019-02-19T16:44:00.001-07:002021-02-22T08:11:42.406-07:00SQL Server Backup Solution? Pick Five. Or Six.SQL Server arguably needs 5 or 6 of these things for backups:<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDR6tG1AkI0XbFDQjTslSXFuwsVsf0OeViG-nfTQR_DSAkl-gDeHou6PsRqKt3qW54i4W8-QRoItnYSQo0LdeW_YMF6qeYxrsQwDJ7ZW1IXSTc8nmZaaNzR5crBQ8VJBOgSw8k/s1600/IMG_9361.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="picture of bamboo rice steamer" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDR6tG1AkI0XbFDQjTslSXFuwsVsf0OeViG-nfTQR_DSAkl-gDeHou6PsRqKt3qW54i4W8-QRoItnYSQo0LdeW_YMF6qeYxrsQwDJ7ZW1IXSTc8nmZaaNzR5crBQ8VJBOgSw8k/s320/IMG_9361.JPG" title="When you see shapes that remind you of SQL Server..." width="240" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">When you see shapes that remind you of SQL Server...</td></tr>
</tbody></table>
<ol>
<li>SQL native backup compression support (less data loss/lower RPOs)<br /><br />Please <b>don't ever</b> ask to disable native backup compression on SQL Server backups. In my experience with SQL Server(which I'll admit is barely over a decade), as soon as a proprietary filter level driver, proprietary stored procedure, agent software, or Virtual Backup Device Interface(VDI) is introduced the feeling of confidence in your backups - and the ability to manage/test/quickly restore them - begins to fade. I'm looking at you, forever incrementals, and buzzword solutions with zones and boosts. Same with magic metadata/bitmaps/snapshots/clones - even if they have their own cmdlets.<br /><br />And what's the cost per GB? And the ongoing cost?<br /></li>
<li>Encryption At Rest (because compliance)</li>
<li>High Sequential I/O Throughput (less data loss/lower RPOs/lower RTOs[faster restores])<br /><br />Test your storage - can it sustain 1 GB(that's giga<b>byte</b>) per second of throughput on backup or restore when watching the network traffic and local I/O on a given volume? More? How many physical interfaces are you using? What type? 10gigabit? VMs eventually map to physical network interfaces. If/when the interfaces are saturated on a given SQL Server how does it affect the server performance? Does SQL Server allow new connections at this point? See number 6.<br /><br />What hardware is being used for your backup solutions? Mechanical drives? Why not flash instead? Which CPUs? How much memory? How much read and write cache and on what media? If a vendor isn't forthcoming with the hardware specs I see it as an indication 🚩 there is something to hide.<br /></li>
<li>Share/filesystem security (NTFS ACLs work)<br />Not a big fan of IP whitelisting, as it's harder to protect your backups. Your employer could cease to exist if data is exfiltrated - not just your job.<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_rz4DqhzvVrvCIKzcVO5hT0ET9f_p6SMxMORHiBBj18isiqWAGreNNQt20hMu0X9iSD5A3MbOl4h9-jd39NjnnogFJgMTyZDb03hXDW8K1o_gDdXholVKZL-guLJmJOoHSQvj/s1600/IMG_9275.JPG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_rz4DqhzvVrvCIKzcVO5hT0ET9f_p6SMxMORHiBBj18isiqWAGreNNQt20hMu0X9iSD5A3MbOl4h9-jd39NjnnogFJgMTyZDb03hXDW8K1o_gDdXholVKZL-guLJmJOoHSQvj/s200/IMG_9275.JPG" width="150" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Doraemon translates backupspeak.</td></tr>
</tbody></table>
</li>
<li>HA(clustered for patching / ~99.9% uptime or higher)<br />What good is awesome throughput if the backup target <b>has to be taken offline every few months or weeks to be patched</b>? Where will backups be written when the backup target is offline?<br /></li>
<li>Recommended: Dedicated VLAN/interface(s) for backup traffic<br />It's reassuring to know that backups and restores aren't going to prevent a legitimate connection from being established to an instance of SQL Server.<br /></li>
<li>optional: Dedupe (to save space)<br />Windows Server dedupe can give you a 3:1 ratio on SQL compressed backups. Really. I've seen this on a VLDB over time(and it was also heavily using index compression of the page variety).<br /></li>
<li>optional: Replication to another datacenter<br />What happens when a fiber-seeking backhoe decides to take out a preferred datacenter for 36 hours?</li>
</ol>
<div>
It seems database backups often get lumped in with some other backup appliance until that backup appliance can't handle the load/storage capacity/dedupe. How much are you paying for SQL Server? Should it have its own dedicated backup solution?</div>
<div>
<br /></div>
<div>
Grant Fritchey has a great video(more of a public service announcement) about <a href="https://www.youtube.com/watch?v=Ah0jabU9G8o">testing backups</a>, and Chrissy LeMaire has a post on <a href="https://dbatools.io/dedicated-server/">building a dedicated server for testing your backups</a>. Brent Ozar has a <a href="https://www.brentozar.com/archive/2009/11/why-dedupe-is-a-bad-idea-for-sql-server-backups/">post from 2009 re: dedupe and backups</a> that has been commented on for over 8.5 years.</div>
Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-43260711514690511302018-06-08T11:25:00.000-06:002018-06-12T11:11:06.094-06:00Why not use the Standard Edition of SQL Server?<span style="font-family: "arial" , "helvetica" , sans-serif;">The question invariably comes up - can't we just use the Standard Edition of SQL Server instead of the more expensive Enterprise Edition?</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">Here are some considerations:</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">1.<span style="white-space: pre;"> </span>Arguably the biggest advantage of Enterprise Edition is increased density - more VMs and more databases can be run on a given physical host using more cores and more memory.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">2.<span style="white-space: pre;"> </span>Without Enterprise Edition you cannot compress your indexes, which means that more space for data pages will be consumed in memory, decreasing server density.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">3.<span style="white-space: pre;"> </span>You may have experienced what happens when Standard Edition is forced as a solution - poor designs leading to increased customer risk and increased downtime. A single outage having to do with indexing when online rebuilds were not available can justify the cost difference, if cost was the only consideration.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">4.<span style="white-space: pre;"> </span>If HA and high performance and server density and additional failover options in the event of catastrophic outages are not needed then Enterprise edition may not be needed.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">5.<span style="white-space: pre;"> </span>Enterprise Edition provides <a href="http://saurabhsinhainblogs.blogspot.com/2014/07/what-is-merry-go-round-scan-in-sql.html">better storage performance</a>.</span><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: right; margin-left: 1em; text-align: right;"><tbody>
<tr><td style="text-align: center;"><a href="https://pbs.twimg.com/media/DfL6U92W4AMeZK2.jpg:orig" imageanchor="1" style="clear: right; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" data-original-height="800" data-original-width="694" height="320" src="https://pbs.twimg.com/media/DfL6U92W4AMeZK2.jpg:orig" width="277" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><span style="font-family: Verdana, sans-serif; font-size: x-small;">Lego Superman prefers the more powerful <br />SQL Server Enterprise Edition.</span></td></tr>
</tbody></table>
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">6.<span style="white-space: pre;"> </span>Only 2 cores will be used when a batch mode query goes parallel. This can affect application performance when querying the database. <a href="https://sqlperformance.com/2016/12/sql-performance/sql-server-2016-enterprise-edition-perf-benefits">Glenn Berry states the following</a>:</span><br />
<br />
<ul class="foo" style="background-color: white; box-sizing: border-box; color: #3d3d3d; font-family: "Noto Sans", "Open Sans", Calibri; font-size: 14px; margin: 0px 0px 17px 30px !important; max-width: 100%; outline: none; padding: 0px 0px 10px 15px; text-rendering: optimizeLegibility;">
<li style="box-sizing: border-box; margin: 0px 0px 11px; max-width: 100%; outline: none; padding: 0px; text-rendering: optimizeLegibility;"><strong style="box-sizing: border-box; margin: 0px; max-width: 100%; outline: none; padding: 0px; text-rendering: optimizeLegibility;">Degree of Parallelism: </strong>Batch mode queries are limited to MAXDOP = 2 on Standard Edition. Enterprise Edition can use all of the cores that are present for the instance. This can be very significant on larger queries on typical, modern server hardware.</li>
</ul>
<span style="font-family: "arial" , "helvetica" , sans-serif;">7.<span style="white-space: pre;"> </span>With Standard Edition - hard CPU limits: If you have a server with more than 24 physical cores Standard Edition will not use the additional cores. (VM or Physical) Standard Edition will use the lesser of 4 sockets or 24 cores. I learned this from attending Glenn Berry's <a href="https://www.sqlskills.com/blogs/paul/sqlintersection-spring-2018/">pre-con at SQL Intersection in March 2018</a>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">8.<span style="white-space: pre;"> </span>With Standard Edition you will not be able to encrypt an entire database without changing application code(Transparent Data Encryption/TDE). Security conscious customers will ask for this.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">9.<span style="white-space: pre;"> </span>Enterprise Edition AlwaysOn Availability Groups can be configured to mitigate zero-day attacks by having replicas <a href="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-availability-group-cross-platform?view=sql-server-2017">span multiple operating systems</a>.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">10.<span style="white-space: pre;"> </span>AlwaysOn Availability Groups provide synchronous or asynchronous readable replicas that can be used for up to the second reporting on production OLTP systems while preserving performance for external facing customers of those systems.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">11.<span style="white-space: pre;"> </span>One of our team's preferred design patterns is using a CNAME pointing to AG listener. Use of CNAMEs with AlwaysOn Availability Groups allows connection strings to remain unaltered for future parallel buildouts and additional replicas.</span><br />
<span style="font-family: "arial" , "helvetica" , sans-serif;"><br /></span>
<span style="font-family: "arial" , "helvetica" , sans-serif;">A valued co-worker put it this way: Our database production environments are established and maintained based on best in class solutions.</span><br />
<div>
<br /></div>
Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-74039692186145735982014-12-15T10:46:00.001-07:002014-12-15T10:56:28.306-07:00Who Rebooted?<p>Run this PowerShell and substitute the actual server name instead of <strong>SQLTACOPS-05</strong> to find out who rebooted in the last 155 days.  This code was <a href="https://social.technet.microsoft.com/Forums/sharepoint/en-US/4deea823-7331-42e4-ade5-4370446eb651/powershell-script-to-get-the-reboot-details-of-windows-server?forum=winserverpowershell">posted</a> by <a href="http://tompaps.blogspot.com/">Tompa</a> on Technet before I tweaked it for my use.</p> <script src="https://gist.github.com/anonymous/81be0913c57c6ee64793.js"></script> <p><a href="http://lh4.ggpht.com/-ciTEHTov6tA/VI8egPHYxNI/AAAAAAAAKmw/sxCElHzUjQ0/s1600-h/Who_Rebooted%25255B4%25255D.png"><img title="Who_Rebooted" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="Who_Rebooted" src="http://lh3.ggpht.com/-dYf0y7ThjMU/VI8egrdNS8I/AAAAAAAAKm4/RO1PvBm4pYo/Who_Rebooted_thumb%25255B2%25255D.png?imgmax=800" width="644" height="169" /></a></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com2tag:blogger.com,1999:blog-20014007.post-91225276856543830262014-09-11T21:50:00.001-06:002014-09-11T21:59:12.884-06:00Las Vegas SQL Server User Group<p>Thanks, <a href="https://twitter.com/sqlrnnr" target="_blank">Jason</a> and <a href="https://twitter.com/StaciaMisner" target="_blank">Stacia</a>, for allowing me to present tonight!</p> <p>Here are the materials from the presentation, including bonus favorite scripts/functions.</p> <p><a href="https://www.dropbox.com/s/frjfymx74hmu5cj/PowerShell%2C%20The%20Way%20of%20the%20DBA%20Dragon%20-%20%40SQLTacOps%20-%20Lars%20Rasmussen.zip?dl=0" target="_blank">PowerShell: The Way of the DBA Dragon – presentation scripts and slide deck</a>. <br /><a href="http://lh3.ggpht.com/-iilqSN-g_tg/VBJvh6GB3jI/AAAAAAAAKcY/EyMF2h9MQ7E/s1600-h/image%25255B5%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-yJn6KyXy5sU/VBJviq9RzaI/AAAAAAAAKcc/oEfXOV_BDK0/image_thumb%25255B1%25255D.png?imgmax=800" width="244" height="138" /></a><a href="http://lh4.ggpht.com/-3_Q-e7AE6zw/VBJvjEeh4nI/AAAAAAAAKco/ox3N8BKkClc/s1600-h/image%25255B2%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-VfrwsQjCOZ4/VBJvj9F_kXI/AAAAAAAAKcs/vJyMGR5_62w/image_thumb.png?imgmax=800" width="244" height="138" /></a></p> <p>I used <a href="http://poshcode.org/search/start-demo" target="_blank">Start-Demo</a> to play back the commands to avoid typing.</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-62779539975963444822014-07-03T15:22:00.001-06:002014-07-03T15:48:00.638-06:00Favorite Function for Checking Disk Space in PowerShell–includes Mountpoints and System Reserved Volumes<p>Found a <a href="http://techontip.wordpress.com/2011/09/12/get-disk-size-using-powershell/">superior function</a> and added a parameter to check disk space compared to <a href="http://larsrasmussen.blogspot.com/2010/12/free-space-on-all-servers-for-all-fixed.html">the old script I was using</a>.</p> <blockquote> <p><font face="Consolas">function df { Param([string[]]$ComputerName) Get-WMIObject Win32_Volume -filter "DriveType=3" -computer $ComputerName | Select SystemName,Caption,Label,@{Name="DiskSize(GB)";Expression={[decimal]("{0:N1}" -f($_.capacity/1gb))}},@{Name="freespace(GB)";Expression={[decimal]("{0:N1}" -f($_.freespace/1gb))}},@{Name="PercentFree(%)";Expression={"{0:P2}" -f(($_.freespace/1gb)/($_.capacity/1gb))}}} </font></p> </blockquote> <p>Here’s an example of omitting system reserved volumes and passing multiple servernames in a text file:</p> <p><a href="http://lh3.ggpht.com/-8bdpAPBhg3Q/U7XPIRyM0JI/AAAAAAAAKWU/86kFMlTqutA/s1600-h/image%25255B8%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-r6WP17kkaL8/U7XPJKGoKbI/AAAAAAAAKWc/16Dkn1eRT7c/image_thumb%25255B4%25255D.png?imgmax=800" width="644" height="407" /></a></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-13506489420544547502014-01-20T17:33:00.001-07:002014-01-20T17:35:40.726-07:00Did I commit that transaction?<p>“Hey, can you run this for me in prod?”</p> <p>There are many reasons the wording in this request is a red flag/indicator of broken processes, but let’s put those aside for a moment. <br />The dev that asked you to run this query may have a legitimate reason.</p> <p>Let’s say you check the estimated execution plan, and the query seems to be low-impact, and unlikely to cause blocking.  You run the query.  Yep, it only modified a few rows and ran in less than a second.  A few minutes later an alert indicates that the query has become a long running statement and is still active.</p> <p><a href="http://www.amazon.com/What-The-Wha-Aquabats-T-shirt/sim/B00C2M03OM/2">What the wha…?!?</a></p> <p>It turns out there were two BEGIN TRAN statements in the t-sql, and a COMMIT was only executed once.  The transaction is still open – uncommitted!</p> <p>In the future you can guard against this scenario by just checking @@TRANCOUNT after the commit and the time of the commit.  If @@TRANCOUNT has a non-zero value, a transaction is still open.</p> <p>Placing the following two commented lines in <a href="http://blogs.msdn.com/b/buckwoody/archive/2009/10/28/templates-for-new-query-window.aspx">SQLfile.sql</a> or pasting the second line at the end of the query can help:</p> <blockquote> <p><font face="Courier New">--BEGIN TRAN</font> <br />[paste query to be executed here, and uncomment the above line if the query modifies data and lacks a BEGIN TRAN]</p> </blockquote> <p>After successfully running the t-sql, commit the transaction with the below statement by selecting and executing the remainder of the line after the two dashes:</p> <blockquote> <p><font face="Courier New">--COMMIT;SELECT @@TRANCOUNT [Open Transactions], Getdate() [timestamp]</font></p> </blockquote> <p>A zero value in the <em>Open Transactions</em> column indicates this session has committed the transaction, and the <em>timestamp</em> lets you know when the transaction was committed, just in case you return to this session later on.</p> <p><a href="http://lh4.ggpht.com/-GzeR3esag_8/Ut3ASYB1xoI/AAAAAAAAF1U/BhA-ACdDV00/s1600-h/image%25255B3%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px 0px 0px 50px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-x1kq0BoFAFs/Ut3ASxrGkWI/AAAAAAAAF1Y/9qCMg8FiRco/image_thumb%25255B1%25255D.png?imgmax=800" width="325" height="86" /></a></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-66252608097482343252013-12-11T08:49:00.001-07:002013-12-11T11:13:29.627-07:00Force a Windows Reboot When the OS Says No<p>I know how to reboot the box from the cli, you say.  I can use <font face="Courier New">shutdown.exe</font> , <font face="Courier New">psshutdown.exe</font> , or the PowerShell cmdlet <font face="Courier New">Restart-Computer</font> with the <font face="Courier New">-Force</font> parameter.</p> <p>Those methods normally suffice, but there are events when a server won’t cooperate.  Maybe it was a hotfix install, or a pending service shutdown.  Or just a lack of patience.  Forcing a reboot of a machine is akin to yanking the power cord out of the wall and plugging it back it in afterward, pushing the physical reset button on a desktop computer, or holding down the power button for five seconds to power down, then pushing it again to power up.</p> <blockquote> <p><strong>The aforementioned methods of shutting down a system are very dangerous.  The methods proposed hereafter are also quite unsafe.</strong></p> <p><strong>The file system might be damaged and unbootable, your company’s data might be lost, unicorns and leprechauns might cry, or some other type of unplanned horribleness could ensue from a less-than-graceful restart.</strong></p> </blockquote> <p>With all that being said here’s how you bend a machine to your restart will:</p> <blockquote> <p><strong>Scenario A</strong>:  The machine already has a pending reboot or shutdown, but can’t be restarted.</p> </blockquote> <blockquote> <p><strong>Solution</strong>: Kill the winlogon process.  The logon session will end and the machine will restart.</p> </blockquote> <p>Here’s an example of what that might look like:</p> <p><a href="http://lh3.ggpht.com/-m29TQJ8uBeM/UqipxVbd2BI/AAAAAAAAFzw/R5DLSyWr7Tk/s1600-h/image%25255B5%25255D%25255B3%25255D.png"><img title="image[5]" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image[5]" src="http://lh3.ggpht.com/-hAld7yhPqRE/UqipzUDNqhI/AAAAAAAAFz4/HUai9T0RF5w/image%25255B5%25255D_thumb%25255B1%25255D.png?imgmax=800" width="933" height="395" /></a></p> <p><font face="Courier New">shutdown.exe /a</font> typically aborts a pending shutdown.  I typed it here knowing it would display the error 1115 message for the screenshot.  I had already tried running <font face="Courier New">shutdown.exe /r </font>without success.</p> <p>Winlogon can be killed with your tool of choice ( pskill, for example ).  Two PowerShell examples follow:</p> <p><font face="Courier New">Get-Process winlogon | Stop-Process -Force</font></p> <p><font face="Courier New">Get-Process | where Name -match winlogon | Stop-Process –Force</font></p> <p><em>Note:  In the absence of a pending reboot, killing the winlogon process can just kill a session/log off users.</em></p> <p> </p> <blockquote> <p><strong>Scenario B</strong>:  The machine does not have a pending reboot or shutdown, but for some reason you want to force a hard reboot immediately in a very ugly way, potentially causing a bluescreen in the process.  I successfully tested the following method against Windows Server 2012, forcing a bluescreen reboot.</p> <p><strong>Solution</strong>: Kill the <a href="http://en.wikipedia.org/wiki/Client/Server_Runtime_Subsystem">csrss</a> process.  The machine will then restart.</p> </blockquote> <blockquote> <p><font face="Courier New">Get-Process csrss | Stop-Process -Force</font></p> <p><a href="http://lh4.ggpht.com/-ZNFUbNLkLf0/UqiXIF_7EgI/AAAAAAAAFzA/UXF6dzgc3OY/s1600-h/image%25255B4%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-LBNpRiKmAok/UqiXJKsUP-I/AAAAAAAAFzI/OCE62lcBh9w/image_thumb%25255B1%25255D.png?imgmax=800" width="663" height="191" /></a></p> </blockquote> <blockquote> <p><em>Note:On Windows 8.1 <a href="http://lh5.ggpht.com/-gJBFOFI0Qyo/UqiZGnVei-I/AAAAAAAAFzU/S51t54YbepU/s1600-h/image%25255B3%25255D.png"><em><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-Hcjrdb0IXN8/UqiZHzuSx3I/AAAAAAAAFzc/eI6I-anuA_k/image_thumb.png?imgmax=800" width="244" height="75" /></em></a> </em><em>killing csrss failed.</em></p> </blockquote> <p>When you can, reboot responsibly.  It’s not the law.  It’s just a good idea.</p> <p> <br /><font size="1">Credit for the winlogon idea in Scenario A goes to </font><a href="http://oasysadmin.com/2012/03/02/force-reboot-of-a-remote-server-that-has-hung-shutting-down/"><font size="1">oasysadmin</font></a><font size="1">.  Killing csrss is an idea I got from Chris B(aka Otis).</font></p> <p><font size="1"></font></p> <p><font size="1"></font></p> <p><font size="1"></font></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-4790232069279806302013-07-22T13:49:00.001-06:002013-07-22T16:10:52.115-06:00Finding SQL Server Cluster Failover Events using PowerShell v3<p>Here’s a 2 node cluster running Windows Server 2008R2 for the OS and a single instance of SQL Server.  If the name of the clustered service/application is known, querying the event log using PowerShell’s remoting features implicitly with Invoke-Command (aliased to <font face="Courier New">icm</font>) makes finding cluster failover events pretty quick.  In this case matching against string <font style="background-color: #cccccc" face="Courier New"> MSSQLSERVER </font>is used, as the full name of the clustered service/app is 'SQL Server (MSSQLSERVER)'.</p> <p>What’s the cluster look like now?</p> <p><font size="1" face="Courier New">7/22/2013 2:01:35 PM :: user@deadair :: D:\Dropbox\bin <br />[6307] # <font style="background-color: #012456" color="#eeedf0" size="3"> icm SQL00 {Get-ClusterGroup} | ft Name, OwnerNode, State, PSComputerName –a  </font></font></p> <p><font size="1" face="Courier New">Name                     OwnerNode  State  PSComputerName <br />----                     ---------  -----  -------------- <br />PORTAL_DTC               sql01      Online SQL00 <br /><font style="background-color: #ffff00">SQL Server (MSSQLSERVER) sql01      Online</font> SQL00 <br />Cluster Group            sql01      Online SQL00 <br />Available Storage        sql01      Online SQL00</font></p> <p> <br />Event ID 1201 is logged when resource groups are brought online within the cluster, so we’re limiting the results to that Event ID.  Running the <font face="Courier New">Get-WinEvent</font> cmdlet against all cluster nodes (just two nodes in this case – SQL00 and SQL01) and assigning the results to a variable allows sorting of entries from all nodes.  Otherwise results would be sorted within the context of the the current remote target(PSComputerName) node. <br /></p> <p><font size="1" face="Courier New">7/22/2013 2:14:19 PM :: user@deadair :: D:\Dropbox\bin <br />[6316] # <font style="background-color: #012456" color="#eeedf0" size="3"> $FailoverEvents = icm SQL00, SQL01 {Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-FailoverClustering/Operational';ID = 1201} | where Message -match MSSQLSERVER } </font></font></p> <p> <br />Now to sort the event log entries…<font size="1" face="Courier New"><font size="3"> </font></font><font size="1" face="Courier New"><font size="3"><font style="background-color: #ffff00"> <br /></font></font></font></p> <p><font size="1" face="Courier New">7/22/2013 2:15:04 PM :: user@deadair :: D:\Dropbox\bin <br />[6317] # <font style="background-color: #012456" color="#eeedf0" size="3"> $FailoverEvents | sort TimeCreated -desc | ft –a  </font></font></p> <p> <br /><font size="1" face="Courier New">   ProviderName: Microsoft-Windows-FailoverClustering</font></p> <p><font size="1" face="Courier New">TimeCreated              Id LevelDisplayName Message                                                                                                          PSComputerName <br />-----------              -- ---------------- -------                                                                                                          -------------- <br />7/19/2013 10:26:24 PM  1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL01 <br />7/13/2013 10:33:05 PM  1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL00 <br />7/13/2013 10:09:08 PM  1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL01 <br />7/6/2013 10:57:32 PM   1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL00 <br />7/6/2013 10:45:58 PM   1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL01 <br />6/1/2013 10:40:18 PM   1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL00 <br />6/1/2013 10:18:50 PM   1201 Information      The Cluster service successfully brought the clustered service or application 'SQL Server (MSSQLSERVER)' online. SQL01</font></p> <p><font size="1" face="Courier New"><font size="3"><font style="background-color: #ffff00"><font style="background-color: #ffffff" size="2" face="Verdana"></font></font></font></font><font size="1" face="Courier New"><font size="3"><font size="2" face="Verdana">Summary: Combining Get-WinEvent with Remoting allows for a very quick recon of events in a cluster.</font></font></font></p> <p><font size="1" face="Courier New"><font size="3"></font></font></p> Prefer a one-liner instead of using a variable? Just perform the sort outside the Get-WinEvent statement block.  Let’s add the day of the week, too!  <br /> <br /> <p><font style="background-color: #012456" color="#eeedf0" size="3" face="Courier New"> <# Cluster Failover Events #> icm SQL00, SQL01 ` <br />{ Get-WinEvent -FilterHashtable @{LogName='Microsoft-Windows-FailoverClustering/Operational';ID = 1201} ` <br />| where Message -match MSSQLSERVER } ` <br />| sort TimeCreated -desc ` <br />| ft @{N='DayofWeek';E={($_.TimeCreated).DayofWeek}} , TimeCreated, ID, Message -a </font> <br /></p> <p><a href="http://lh3.ggpht.com/-YenYrz8buSA/Ue2r5RzYoNI/AAAAAAAAFWM/Xpsv24vAbZw/s1600-h/image%25255B12%25255D.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-StLNSqQqZCQ/Ue2r561lC4I/AAAAAAAAFWQ/mR7bxIqQQnE/image_thumb%25255B6%25255D.png?imgmax=800" width="644" height="388" /></a></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-9612677067102847912013-06-24T22:29:00.001-06:002013-07-01T17:56:53.913-06:00Search SQL Server Error Logs Using PowerShell (Get-SqlErrorLog)<p>Scenario 1: <br />A new email just arrived – an alert indicating a deadlock occurred right at the beginning of the work day.</p> <p>Argh.</p> <p>But I did previously add a couple of trace flags (<a href="http://msdn.microsoft.com/en-us/library/ms188396.aspx">1204 and 1222</a>) on all our prod instances that give more deadlock info in the error log.  That’ll help.  Someday I’ll get around to monitoring deadlocks with extended events…</p> <p>Let me connect to that server in SSMS and drill down through Management –> SQL Server Error Logs… wait a minute.  I’ve searched through Windows event logs before using PowerShell cmdlets, so why am I _clicking_ through a GUI?  This just feels wrong.</p> <p>There’s surely a cmdlet for this… found it!</p> <p><a href="http://lh5.ggpht.com/-CAhtnne97Aw/Uckcl45cvdI/AAAAAAAAFOw/a7IgVxe69cg/s1600-h/image%25255B3%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-myssMcrDk6U/UckcmVBIpgI/AAAAAAAAFO4/gumXZ2qsgnY/image_thumb%25255B1%25255D.png?imgmax=800" width="400" height="253" /></a><font size="1"> <br />Not sure why I have multiple copies of commands there – probably <br />loaded multiple modules or something.</font></p> <p><a href="http://sqlpsx.appspot.com/Get-SqlErrorLog.htm">Get-SQLErrorLog</a> from SQL Server PowerShell Extensions (<a href="http://sqlpsx.codeplex.com/">SQLPSX</a>) was exactly what I wanted – a function to return the SQL Server Errorlog.  I know the time of the deadlock because of the error message in my inbox – it was 09:08:55 this morning.</p> <p><a href="http://lh6.ggpht.com/--JXZ2EM4OUM/Uckcm7PtX2I/AAAAAAAAFPA/fdnXhrnVqAQ/s1600-h/image%25255B14%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh6.ggpht.com/-A-pRSdFSdqU/UckcnTnDkoI/AAAAAAAAFPI/bOpbTnT9nL8/image_thumb%25255B6%25255D.png?imgmax=800" width="437" height="169" /></a></p> <p>Let’s give it a 1 minute window before and after that time:</p> <blockquote> <p><font face="Courier New">Get-SqlErrorLog  -sqlserver "SQLTACOPS" | ` <br />Where {$_.LogDate -GT '2013-06-24 09:07:55' -AND $_.LogDate -LT '2013-06-24 09:09:55' } | ft -a</font></p> </blockquote> <p><a href="http://lh5.ggpht.com/-rcWy7uUYXS0/UckcoRfejnI/AAAAAAAAFQY/dtPP3da5cdA/s1600-h/image%25255B122%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-cY0IU5xoUEo/Uckco7IA5lI/AAAAAAAAFQg/Dc0iRI7mK5E/image_thumb%25255B108%25255D.png?imgmax=800" width="734" height="107" /></a></p> <p>Using additional conditions can exclude events such as backups and logins.  Pipelining output to the Export-CSV cmdlet creates a file that can be quickly saved and shared.</p> <blockquote> <p><font face="Courier New">Get-SqlErrorLog  -sqlserver "SQLTACOPS" | ` <br /></font><font face="Courier New">Where {$_.LogDate -GT '2013-06-24 09:07:55' -AND ` <br />       $_.LogDate -LT '2013-06-24 09:09:55' -AND ` <br />       $_.ProcessInfo -NE 'Logon' -AND ` <br />       $_.ProcessInfo -NE 'Backup'} | ` <br />       Export-CSV -NoType 2013-06-24_090855_log_deadlock.csv</font></p> </blockquote> <blockquote> <p align="left"><a href="http://lh6.ggpht.com/-q7UBkSrO5Xc/UckcpQ4viKI/AAAAAAAAFPg/TNC5J6gIAO8/s1600-h/image%25255B22%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-taLVmlv9vt0/UckcpyGcebI/AAAAAAAAFPo/SAauBA0vsOk/image_thumb%25255B10%25255D.png?imgmax=800" width="244" height="76" /></a> <br /></p> </blockquote> <p>Scenario 2: <br />Two databases filled an entire volume with transaction log entries during index maintenance.  The recovery model of the databases was temporarily changed to SIMPLE, logs were shrunk, and the databases were reverted to FULL recovery model.  Even though full backups of the databases were created before and after changing the recovery model, this breaks the backup chain for those databases and my boss requested I log this in the server redbook.  We cycle the error log each night at midnight, and the the recovery models were changed 2 logs (days) ago.  Get-SqlErrorLog has a lognumber parameter, where 0 is the the index of the current log.</p> <blockquote> <p><font face="Courier New">Get-SqlErrorLog -lognumber 2 -sqlserver "SQLTACOPS" | ` <br />    Where {$_.LogDate -GT '2013-06-22 13:00' -AND ` <br />    $_.LogDate -LT '2013-06-23 18:00' -AND ` <br />    $_.ProcessInfo -NE 'Logon' -AND ` <br />    $_.ProcessInfo -NE 'Backup'} | ` <br />    Where {$_.text -LIKE 'Setting database option RECOVERY*' } | ft –a</font></p> </blockquote> <p><a href="http://lh6.ggpht.com/-7akpvyewYJQ/UckcqCRwBRI/AAAAAAAAFQo/Zdt7jNa-Xvw/s1600-h/image%25255B123%25255D.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://lh5.ggpht.com/-C_-gveUl3_Y/Uckcqs8NmjI/AAAAAAAAFQw/4f_kgunips4/image_thumb%25255B109%25255D.png?imgmax=800" width="644" height="198" /></a></p> <p>The output (including the censored database names) was then copied and pasted into the redbook for that server.  PowerShell can be used as a tool for quick, accurate documentation.</p> <p>The effort of clicking through a UI to troubleshoot has very little reuse value.  A <a href="http://pastebin.com/Kam1QGdv">persisted PowerShell session command line history</a>, transcript, or saved script file can be shared, and used again and again. <br /> <br />A question to ask yourself: If I have to do this two or more times, should I consider investing some time to learn how to access the information/automate the process in PowerShell?</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-78282988290750336532013-01-09T10:18:00.001-07:002013-01-09T10:51:10.448-07:00Identifying i/o Bottlenecks in SQL Server<p>In November of 2012 I presented to the Utah Valley SQL Server User Group on finding performance issues within SQL Server instances by focusing on storage and i/o for data and log files.</p> <p>The <a href="https://www.dropbox.com/s/ccrtzsqj9p5zbbe/Identifying%20io%20bottlenecks.pptx">Identifying i/o Bottlenecks slide deck is now available</a>. <br /><a href="https://www.dropbox.com/s/ccrtzsqj9p5zbbe/Identifying%20io%20bottlenecks.pptx"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://lh3.ggpht.com/-32HKsvPS_uk/UO2t0ri3LQI/AAAAAAAAECM/c7rYZQL5h-k/image%25255B4%25255D.png?imgmax=800" width="644" height="483" /></a> <br /> <br />I used some slides from <a href="http://sqlserverio.com/2011/05/13/sqlrally-is-a-smashing-success/">Wes Brown’s May 2011 SQL Rally presentation on Understanding Storage Systems and SQL Server</a>, and included some PowerShell snippets.</p> <p>There is a <a href="http://larsrasmussen.blogspot.com/2010/12/free-space-on-all-servers-for-all-fixed.html">PowerShell script mentioned in a previous post I frequently use to view the storage used by a particular server</a> referenced in the deck. </p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-7536355282281612152012-12-27T13:02:00.001-07:002012-12-27T13:06:22.719-07:00Worst Passwords from the Past Year<p>Seems like ‘monkey’ is still popular. <br /> <br />Worst Passwords of 2012 — and How to Fix Them <br /><a href="http://splashdata.com/press/PR121023.htm">http://splashdata.com/press/PR121023.htm</a></p> <p>My favorite approach is using multifactor authentication w/<a href="https://lastpass.com/">LastPass</a> , <a href="http://www.youtube.com/watch?v=zMabEyrtPRg&t=2m13s">application-specific passwords</a>, and not even knowing your passwords, but here’s <a href="https://www.grc.com/haystack.htm">an approach from Steve Gibson</a> (counter argument <a href="http://technophobe.net/haystack/">here</a>). <br /> <br /><a href="https://www.grc.com/haystack.htm"><img title="Password_haystacks_12_27_2012 12_55_48 PM" style="float: none; margin-left: auto; display: block; margin-right: auto" alt="Password_haystacks_12_27_2012 12_55_48 PM" src="http://lh5.ggpht.com/-9tLcGFjpby4/UNypRySt7tI/AAAAAAAABHM/Pym3ceK3iP0/Password_haystacks_12_27_2012%25252012_55_48%252520PM%25255B5%25255D.png?imgmax=800" width="418" height="172" /></a></p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-75291007405973071182011-08-04T10:21:00.002-06:002012-01-05T16:35:43.508-07:00Caffeine - Utility to disable screen saver w/o interrupting input<p>I ran this on a machine I was RDP’d into to prevent the screen saver from appearing while I was logged in.  Handy.  And like other powerful utilities, potentially dangerous.  Not so much in an RDP session, though, because the console running the RDP client wouldn’t/shouldn’t(not a good idea) have this running, just the target host.  The author simulates an F15 keypress to make this work.  Didn’t know I had an F15 key.  Very nice.</p> <p>Only 2 files inside the compressed download, and one is a README.</p> <p><a href="http://www.zhornsoftware.co.uk/caffeine/">http://www.zhornsoftware.co.uk/caffeine/</a> <br /><b>Caffeine</b></p> <p><img style="background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-9HCS1jwvQv8/TjrG_nfroSI/AAAAAAAAAZ0/6XuygdX1gyw/image%25255B6%25255D.png?imgmax=800" width="203" height="44" />If you have problems with your PC locking or going to sleep, caffeine will keep it awake. It works by simulating a keypress once every 59 seconds, so your machine thinks you're still working at the keyboard, and won't lock the screen or activate the screensaver. </p> <p>The icon is shown above - it's the leftmost one in the task tray, and this is all you see. Double-clicking the icon empties the coffee pot (that's what the icon is) and temporarily disables the program. Double-clicking it again refills the pot, and will keep your machine awake. </p>Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-69368284040051412872011-07-06T12:03:00.001-06:002011-07-06T12:06:26.935-06:00Firewall Upgrade to pfSense 2.0 RC3 from pfSense 2.0 RC1<p>This morning I downloaded the latest (2.0 RC3) full upgrade of pfSense for my home firewall.  I was previously running pfSense 2.0 RC1.  I’ve been using pfSense since it was in alpha, and have always found it to be extremely stable.</p> <p><strong>Step 1</strong>: <a href="http://doc.pfsense.org/index.php/Configuration_Backup_and_Restore">Backup your current pfSense configuration</a>, just to be safe.</p> <p><strong>Step 2</strong>: <a href="http://www.pfsense.org/index.php?option=com_content&task=view&id=58&Itemid=46">Download the full upgrade</a> for your architecture(i386 for me – I run pfSense on an old laptop for power savings)</p> <p><a href="http://lh5.ggpht.com/-dZLzB8YVA_k/ThSjVZlbaJI/AAAAAAAAAVA/rR5AxaqjN7s/s1600-h/image%25255B2%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/-qtBuoG9tp40/ThSjWJmR6LI/AAAAAAAAAVE/O79N8d71aKI/image_thumb.png?imgmax=800" width="209" height="244" /></a></p> <p><strong>Step 3</strong>: Upload the firmware via the pfSense web interface ( System >> Firmware ) & click ‘Upgrade firmware’</p> <p><a href="http://lh3.ggpht.com/-LCwU78VyFzA/ThSjWy5fs1I/AAAAAAAAAVI/_e0VGwArc_8/s1600-h/image%25255B5%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/-8Jzfr_DC4lg/ThSjXbiz8OI/AAAAAAAAAVM/t1-xXV75PLo/image_thumb%25255B1%25255D.png?imgmax=800" width="244" height="165" /></a></p> <p><strong>Step 4</strong>: Wait for the upgrade to complete.  I navigated to the home page of the web interface for pfSense during the upgrade and found this nifty ‘upgrade is currently in progress’ screen.  The speakers on the old laptop still work, and a lovely series of beeps and tweets played once the firewall completed its upgrade and boot sequence.</p> <p><a href="http://lh3.ggpht.com/-OShjgBmvJww/ThSjX1DH5AI/AAAAAAAAAVQ/qSZG8wkYh04/s1600-h/image%25255B8%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh4.ggpht.com/-X7ayn9nOc7k/ThSjYNIf5cI/AAAAAAAAAVU/fXmcEUY3yaI/image_thumb%25255B2%25255D.png?imgmax=800" width="244" height="158" /></a></p> <p><strong>Step 5</strong>: Logon to pfSense web interface, verify new version, and confirm firewall functionality.</p> <p><a href="http://lh5.ggpht.com/-tlAnj0yKRqA/ThSkIHsk5FI/AAAAAAAAAVg/tMdQ9McoKbI/s1600-h/image%25255B14%25255D.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/-iaKDh3hARA4/ThSkIiNAKWI/AAAAAAAAAVk/xXpEAFHXtkk/image_thumb%25255B4%25255D.png?imgmax=800" width="244" height="231" /></a></p> <p>All done!</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-20588512727436826082010-12-17T11:48:00.001-07:002011-01-01T11:53:05.961-07:00From FLAC to MP3 and back again–EAC Rips with LAME<p>Maximum PC has a great post on <a href="http://www.maximumpc.com/article/howtos/howto_rip_archivalquality_mp3s_audio_cds?page=0,0">Ripping archival quality MP3s from audio CDs</a>, but one of the user comments following the article simplifies the LAME options.</p> <p>User <a href="http://www.maximumpc.com/user/vintagegold">vintagegold</a> suggests using the following: <br /> <br /><font face="Courier New">-V0 %s %d</font></p> <p>I just tried the above settings within LAME to rip a classical CD – Borodin – and it sounds great on my <a href="http://www.dansdata.com/k271.htm">AKG K 271 Studio headphones</a>.  The <a href="http://wiki.hydrogenaudio.org/index.php?title=Recommended_LAME#Recommended_encoder_settings">HydrogenAudio wiki</a> does indicate one preset with even higher quality for archiving, but my ears(which are still sensitive enough to hear the frequency on certain monitors/LCDs) don’t find the higher constant 320 kbit bitrate necessary.</p> <p>Some of my essential <a href="http://www.exactaudiocopy.de/">EAC</a> Screenshots – refer to the <a href="http://www.maximumpc.com/article/howtos/howto_rip_archivalquality_mp3s_audio_cds?page=0,0">Maximum PC article</a> for setting up Accurate Rip and other portions of EAC:</p> <p><a href="http://lh5.ggpht.com/_i9HjVXB62LY/TQuwZqSTC9I/AAAAAAAAAS0/NYPuANIR0Pw/s1600-h/EAC0001%5B5%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="EAC0001" border="0" alt="EAC0001" src="http://lh5.ggpht.com/_i9HjVXB62LY/TQuwZ25WtrI/AAAAAAAAAS4/nbt2V_IPGks/EAC0001_thumb%5B3%5D.png?imgmax=800" width="240" height="207" /></a><a href="http://lh5.ggpht.com/_i9HjVXB62LY/TQuwaDxFibI/AAAAAAAAAS8/N2p8umdyC2Y/s1600-h/EAC0002%5B3%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="EAC0002" border="0" alt="EAC0002" src="http://lh6.ggpht.com/_i9HjVXB62LY/TQuwalLc_RI/AAAAAAAAATA/u4I1-wfLav8/EAC0002_thumb%5B1%5D.png?imgmax=800" width="240" height="211" /></a><a href="http://lh3.ggpht.com/_i9HjVXB62LY/TQuwaiOZCqI/AAAAAAAAATE/s-l4FfJSz4I/s1600-h/EAC0003%5B3%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="EAC0003" border="0" alt="EAC0003" src="http://lh5.ggpht.com/_i9HjVXB62LY/TQuwbLyl6RI/AAAAAAAAATI/9-HcGysHjfI/EAC0003_thumb%5B1%5D.png?imgmax=800" width="240" height="210" /></a></p> <p><a href="http://lame.buanzo.com.ar/">Arturo "Buanzo" Busleiman</a> has current Windows and Mac downloads of the <a href="http://lame.sourceforge.net/links.php#Binaries">LAME binaries</a> [high quality MPEG Audio Layer III (MP3) encoder] on his Argentina-hosted site.  The <a href="http://lame.buanzo.com.ar/Lame_v3.98.3_for_Audacity_on_Windows.exe">Audacity for Windows download</a> worked on windows 7 x64.</p> Goodbye FLAC – I’ll not miss your options. <br /><font size="1" face="Courier New">-8 -A tukey(0.25) -A gauss(0.1875) -b 4096 -V -T "artist=%a" -T "title=%t" -T "album=%g" -T "date=%y" -T "tracknumber=%n" -T "genre=%m" %s --sector-align</font> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-67249283480577280412010-12-15T17:46:00.001-07:002010-12-15T17:57:17.623-07:00Wildcard Search for Exchange Recipients PowerShell Function<p>I wanted to do a partial string search against names and aliases, and used the output from the Exchange Management Shell Command Log to write a PowerShell function that returned the type of broad result set I wanted, finding a match with names OR aliases.</p> <pre style="border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; padding-bottom: 5px; line-height: 14px; background-color: #eee; padding-left: 5px; width: 100%; padding-right: 5px; font-family: andale mono, lucida console, monaco, fixed, monospace; color: #000000; font-size: 12px; overflow: auto; border-top: #999999 1px dashed; border-right: #999999 1px dashed; padding-top: 5px"><code>function Get-Recip<br />{<br /> param (<br /> [string]$Filter=$(throw 'Partial Recipient Name or Partial Recipient Alias required')<br /> )<br /><br /># Wildcard search prepended and appended to filter string passed, limit result set to 1000 matches<br /><br />$Filter= "*"+ $Filter + "*";<br /><br />Get-Recipient -PropertySet ConsoleLargeSet -ResultSize '1000' -SortBy DisplayName `<br />-RecipientType 'DynamicDistributionGroup','UserMailbox','MailContact','MailUser', `<br />'MailUniversalDistributionGroup','MailUniversalSecurityGroup','MailNonUniversalGroup' `<br />-Filter {(Name -like $Filter ) -OR (Alias -like $Filter)}<br /><br />}<br /></code></pre> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-27940206816041895802010-12-13T15:41:00.001-07:002010-12-13T16:20:53.908-07:00Free Space on all servers for all fixed drives? Done.<p>A while ago I posted on <a href="http://larsrasmussen.blogspot.com/2008/07/querying-disk-space-on-remote-servers.html">querying free disk space using WMI and batch</a>.</p> I wouldn't query free disk space using batch anymore.  The <a href="http://www.myitforum.com/articles/42/view.asp?id=11142">PowerShell script I tweaked</a> and currently use to query free disk space is displayed below.  The script truncates for readability – the rounding methods are commented out if that’s your preference: <pre style="border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; padding-bottom: 5px; line-height: 14px; background-color: #eee; padding-left: 5px; width: 100%; padding-right: 5px; font-family: andale mono, lucida console, monaco, fixed, monospace; color: #000000; font-size: 12px; overflow: auto; border-top: #999999 1px dashed; border-right: #999999 1px dashed; padding-top: 5px"><code># spaceused.ps1<br /># Lars-UT http://larsrasmussen.blogspot.com<br />(Get-Date -format 'yyyy-MM-dd hh:mm:ss').ToString() | Out-Default<br />$outData = @("")<br />$server = $args[0]<br />$dataFromServer = Get-WmiObject Win32_Volume -ComputerName $server | Select-Object SystemName,Label,Name,DriveLetter,DriveType,Capacity,Freespace<br /><br />foreach ($currline in $dataFromServer) {<br /> if ((-not $currline.name.StartsWith("\\")) -and ($currline.Drivetype -ne 5)) {<br /> [float]$tempfloatcapacity = [math]::truncate($currline.Capacity/ 1000000000)<br /> #[float]$tempfloatcapacity = [math]::round(($currline.Capacity/ 1000000000),1)<br /> add-member -InputObject $currline -MemberType NoteProperty -name Capacity_in_GB -value "$tempfloatcapacity GB"<br /> <br /> [float]$tempfloat = ($currline.Freespace / 1000000) / ($currline.Capacity / 1000000)<br /> $temppercent = [math]::round(($tempfloat * 100),2)<br /> add-member -InputObject $currline -MemberType NoteProperty -name FreePercent -value "$temppercent %"<br /> <br /> [float]$tempfloatfreespace = [math]::truncate($currline.Freespace/ 1000000000)<br /> #[float]$tempfloatfreespace = [math]::round(($currline.Freespace/ 1000000000),1)<br /> add-member -InputObject $currline -MemberType NoteProperty -name Freespace_in_GB -value "$tempfloatfreespace GB"<br /> <br /> $outData = $outData + $currline<br /> }<br />}<br /><br />$outData | Select-Object SystemName,Label,Name,Capacity_in_GB,Freespace_in_GB,FreePercent | sort-object -property Name | format-table -autosize<br /></code></pre><br />To run this against muliple servers just put the server names, one per line, in a text file and save that file. You'll then assign that file to a variable in PowerShell and loop through each line for each server: <br /><br /><pre style="border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; padding-bottom: 5px; line-height: 14px; background-color: #eee; padding-left: 5px; width: 100%; padding-right: 5px; font-family: andale mono, lucida console, monaco, fixed, monospace; color: #000000; font-size: 12px; overflow: auto; border-top: #999999 1px dashed; border-right: #999999 1px dashed; padding-top: 5px"><code>PS C:\> $serverlist = Get-Content .\ServerNames-Prod.txt<br />PS C:\> foreach ($server in $serverlist) { .\spaceused.ps1 $server }<br /></code></pre><br /><br /><p>Here’s the pretty output!  Yep, those are sub-second times for querying multiple servers.</p><br /><br /><p><a href="http://lh4.ggpht.com/_i9HjVXB62LY/TQahEyWmzNI/AAAAAAAAASs/AZSjIOcMtt0/s1600-h/spaceused.ps1%5B5%5D.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="spaceused.ps1" border="0" alt="spaceused.ps1" src="http://lh3.ggpht.com/_i9HjVXB62LY/TQahFBGw0AI/AAAAAAAAASw/XS0PTv29zDA/spaceused.ps1_thumb%5B3%5D.png?imgmax=800" width="644" height="414" /></a></p><br /><br /><p>Need to document this?  Use Start-Transcript.  I’ve seen auditors use it like so:</p><br /><br /><pre style="border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; padding-bottom: 5px; line-height: 14px; background-color: #eee; padding-left: 5px; width: 100%; padding-right: 5px; font-family: andale mono, lucida console, monaco, fixed, monospace; color: #000000; font-size: 12px; overflow: auto; border-top: #999999 1px dashed; border-right: #999999 1px dashed; padding-top: 5px"><code>PS C:\> $strTimestamp = [string](Get-Date -format "yyyy-MM-dd_hh-mm")<br />PS C:\> start-transcript .\ServerSpace-$strTimestamp.txt<br />PS C:\> foreach ($server in $serverlist) { .\spaceused.ps1 $server } <br />PS C:\> Stop-Transcript<br /></code></pre><br /><br /><p>Enjoy.</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-2330088615954458492010-09-03T15:48:00.001-06:002010-09-03T15:48:33.910-06:00Music for Entering or Staying in “The Zone”<p>The zone.  It’s that special place where you find the ability to intensely focus and compress large workloads or complex tasks.  Good music can help, whether its classical, inspirational, ambient, or just familiar.  I often listen to music with no vocals to minimize the distractions surrounding my cubicle.</p> <p>Here are a few oft-played tracks on my system courtesy of <a href="http://listen.grooveshark.com/">Grooveshark</a> as an example: <br /> <br /></p> <object width="250" height="400"> <param name="movie" value="http://listen.grooveshark.com/widget.swf" /> <param name="wmode" value="window" /> <param name="allowScriptAccess" value="always" /> <param name="flashvars" value="hostname=cowbell.grooveshark.com&widgetID=22401377&style=metal&bbg=000000&bfg=666666&bt=FFFFFF&bth=000000&pbg=FFFFFF&pbgh=666666&pfg=000000&pfgh=FFFFFF&si=FFFFFF&lbg=FFFFFF&lbgh=666666&lfg=000000&lfgh=FFFFFF&sb=FFFFFF&sbh=666666&p=0" /> <embed src="http://listen.grooveshark.com/widget.swf" type="application/x-shockwave-flash" width="250" height="400" flashvars="hostname=cowbell.grooveshark.com&widgetID=22401377&style=metal&bbg=000000&bfg=666666&bt=FFFFFF&bth=000000&pbg=FFFFFF&pbgh=666666&pfg=000000&pfgh=FFFFFF&si=FFFFFF&lbg=FFFFFF&lbgh=666666&lfg=000000&lfgh=FFFFFF&sb=FFFFFF&sbh=666666&p=0" allowScriptAccess="always" wmode="window" /></object> <p>I also listen to SomaFM – you should be able to <a href="http://somafm.com/">find channels there</a> for your particular taste, such as: <br /> <br /><a href="http://somafm.com/fw/groovesalad.pls">Groove Salad</a> <br /><a href="http://somafm.com/fw/spacestation.pls">Space Station Soma</a> <br /><a href="http://somafm.com/fw/missioncontrol.pls">Mission Control</a> <br /><a href="http://somafm.com/fw/lush.pls">Lush</a> <br /><a href="http://somafm.com/fw/suburbsofgoa.pls">Suburbs of Goa</a> <br /><a href="http://somafm.com/fw/dronezone.pls">Drone Zone</a> <br /><a href="http://somafm.com/fw/u80s.pls">Underground 80s</a> <br /> <br />Sometimes you want to listen to a specific track immediately.  The <a href="http://marklets.com/Grooveselect.aspx">GrooveSelect</a> and <a href="http://marklets.com/Search+Grooveshark.aspx">Search GrooveShark</a> bookmarklets will instantly cue it up.</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com1tag:blogger.com,1999:blog-20014007.post-73982622513897593462010-09-01T16:52:00.001-06:002010-09-01T17:04:57.089-06:00Thermal Reactor > Fast Reactor: August CTO Breakfast Notes<p>“We can build self-controlling reactors.” <br /> <br />YouTube - Thorium Remix 2009 - LFTR in 25 Minutes <br /><a href="http://www.youtube.com/watch?v=EHdRJqi__Z8">http://www.youtube.com/watch?v=EHdRJqi__Z8</a> </p> <p>The Liquid Fluoride Thorium Reactor: What Fusion Wanted To Be <br /><a href="http://www.youtube.com/watch?v=AHs2Ugxo7-8">http://www.youtube.com/watch?v=AHs2Ugxo7-8</a> <br /> <br /> <br />Kynetx Demo from <a href="http://twitter.com/telegramsam">Sam Curren</a> – Holy Personal Data Stores! <br /> <br /> <br />UTOSC (Utah Open Source Conference) 2010 - October 7-9, 2010 <br /><a title="http://utosc.com/" href="http://utosc.com/">http://utosc.com/</a></p> <p> <br />The Future of UI <br /><a href="http://blog.ted.com/2010/06/01/drive_3d_data_w/">http://blog.ted.com/2010/06/01/drive_3d_data_w/</a> <br /> <br /> <br />AppInventor <br /><a href="http://appinventor.googlelabs.com/about/">http://appinventor.googlelabs.com/about/</a> <br /> <br /> <br />Blue Ant T1 Bluetooth Headset – <a href="http://twitter.com/humancell">Scott Lemon</a> is converted to this headset model. <br /><a href="http://www.myblueant.com/products/headsets/t1/index.php#video">http://www.myblueant.com/products/headsets/t1/index.php#video</a> <br /> <br /> <br />Swype text input for Android phones – heavily endorsed by Sam. <br /><a href="http://swypeinc.com/">http://swypeinc.com/</a> <br /> <br />Hope to see you at the next <a href="http://www.windley.com/cto_forum">CTO Breakfast</a>!</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com2tag:blogger.com,1999:blog-20014007.post-84768073129844667352010-07-19T14:25:00.002-06:002010-07-21T22:44:52.123-06:00AV Security Suite Malware Removal: Panda said I was clean, ComboFix disagreed<p>"There's this security software that keeps popping up and I can't use my computer."</p> <p>Say goodbye to several hours of your life should you decide to help.</p> <p>But I've got this <a href="http://www.maximumpc.com/article/howtos/ultimate_malware_removal_guide_purge_your_pc_junk_files">great malware removal guide from Maximum PC</a>, and I've been doing tech support since the mid-1990s - no problem right?</p> <p>Oh, the pain. I'm going to try mitigate others' potential suffering by sharing what helped me.</p> <p>The <a href="http://www.maximumpc.com/article/howtos/ultimate_malware_removal_guide_purge_your_pc_junk_files">Maximum PC Guide for removing malware</a> contains some great comprehensive steps. Here are a few things that can be done to supplement the guide.</p> <p>Booting the operating system that has the problem can slow you down at first.</p> <p>1. Erase a spare USB Key and use <a href="http://unetbootin.sourceforge.net/">UNetbootin</a> to create a <a href="http://devbuilds.kaspersky-labs.com/devbuilds/RescueDisk10/kav_rescue_10.iso">bootable Kaspersky Rescue Disk</a>. Use this tool to remove some of the less resilient threats.</p> <p><a href="http://lh4.ggpht.com/_i9HjVXB62LY/TES0lMh7wOI/AAAAAAAAAQo/k7CfZT56Vnk/s1600-h/AV_Security_Suite_038-50pct-resample%5B4%5D.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="AV_Security_Suite_038-50pct-resample" border="0" alt="AV_Security_Suite_038-50pct-resample" src="http://lh6.ggpht.com/_i9HjVXB62LY/TES0liDjvwI/AAAAAAAAAQs/ZhRIlHPb51Q/AV_Security_Suite_038-50pct-resample_thumb%5B2%5D.png?imgmax=800" width="244" height="146" /></a> </p> <p>2. Boot in safe mode and run the following from a CMD prompt to delete Temp & "Temporary Internet Files"  directories for all user Profiles(assumes XP install w/profiles on C: drive ):</p> <pre style="border-bottom: #999999 1px dashed; border-left: #999999 1px dashed; padding-bottom: 5px; line-height: 14px; background-color: #eee; padding-left: 5px; width: 100%; padding-right: 5px; font-family: andale mono, lucida console, monaco, fixed, monospace; color: #000000; font-size: 12px; overflow: auto; border-top: #999999 1px dashed; border-right: #999999 1px dashed; padding-top: 5px"><code>C:\> for /f "usebackq" %a in (`dir /b /a "c:\documents and settings"`) do rd /s /q "c:\documents and settings\%a\Local Settings\Temp"<br /><br />C:\> for /f "usebackq" %a in (`dir /b /a "c:\documents and settings"`) do rd /s /q "c:\documents and settings\%a\Local Settings\Temporary Internet Files"<br /></code></pre><br /><br /><p>3. Defrag. Auslogics has a <a href="http://www.auslogics.com/en/software/disk-defrag/">good free defragmenter</a>, or you can use the built-in defragmenter.</p><br /><br /><p>4. <a href="http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx">Autoruns</a> <br /><br /> <br /><a href="http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="0006" border="0" alt="0006" src="http://lh6.ggpht.com/_i9HjVXB62LY/TES0l9seoaI/AAAAAAAAAQw/_V0CuOki-5M/0006%5B3%5D.png?imgmax=800" width="109" height="89" /></a> from Mark Russinovich and Bryce Cogswell(Don't use this unless you feel very familiar with windows services) - Click the Options menu, Check the Boxes for "Hide Microsoft and Windows Entries" and "Verify Code Signatures" as shown in this screenshot: <br /><br /> <br /><br /><br /> <br /><a href="http://lh3.ggpht.com/_i9HjVXB62LY/TES0mLLK5zI/AAAAAAAAAQ0/sC_5CS7RWsI/s1600-h/0007%5B7%5D.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="0007" border="0" alt="0007" src="http://lh4.ggpht.com/_i9HjVXB62LY/TES0nOb_PoI/AAAAAAAAAQ4/g0U4tVkpDaM/0007_thumb%5B5%5D.png?imgmax=800" width="644" height="135" /></a> </p><br /><br /><p>Push the Escape key, then hit F5 to refresh in Autoruns.  Now inspect the list and right-click the odd looking entries. You can choose to "Delete" the offender or "Jump To..." to open up a Window with the startup location referencing the item - usually in the registry.</p><br /><br /><p>5. Run CCleaner. Cut Deep - but remember to be nice - some users like their Internet History kept intact, and I like to keep my Start >> Run history while troubleshooting.</p><br /><br /><p>6. At this point you can go ahead and step through the Maximum PC guide. What follows is the snag I ran into in removing a piece of malware called AV Security Suite and how to get around that snag thanks to some specific posts from chaslang at MajorGeeks and other posts from <a href="http://www.bleepingcomputer.com/virus-removal/remove-av-security-suite">BleepingComputer</a>.</p><br /><br /><p>After running <a href="http://www.superantispyware.com/downloadfile.html?productid=SUPERANTISPYWAREFREE">SuperAntiSpyware</a> and Malwarebytes <a href="http://www.download.com/Malwarebytes-Anti-Malware/3000-8022_4-10804572.html?part=dl-10804572&subj=dl&tag=button">Anti-Malware</a>, and subsequently running <a href="http://www.pandasecurity.com/activescan/index/">Panda's Activescan 2.0</a>, it looked like the machine was clean. I then started <a href="http://www.combofix.org/">ComboFix</a> and received the following error, but ran ComboFix anyway:<a href="http://lh5.ggpht.com/_i9HjVXB62LY/TES0ne1PQwI/AAAAAAAAAQ8/0u1Nxl0FNF8/s1600-h/0002%5B4%5D.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="0002" border="0" alt="0002" src="http://lh5.ggpht.com/_i9HjVXB62LY/TES0nuiWYPI/AAAAAAAAARA/3kjD9MjhkVs/0002_thumb%5B2%5D.png?imgmax=800" width="408" height="200" /></a> Panda FAIL. AV Security Suite was supposed to be gone. Panda said the box was clean! Why, Panda, why? The ComboFix log displayed the following AV Security Suite GUID:</p><br /><br /><h4>AE716D16-40FE-4cb9-8FD2-2975088F55B2</h4><br /><br /><p>Googling that GUID resulted in a <a href="http://forums.majorgeeks.com/showpost.php?s=3267c1d818674a91ca0f821aa6cc0b76&p=1507844&postcount=3">lifesaver post</a> by chaslang, which stated there was a Browser Helper Object(BHO) that sill needed to be deleted. I skipped the first suggestion in chaslang's post to run MGTOOLS\analyse.exe, but followed his other instructions.</p><br /><br /><p>HijackThis found the offender. <br /> <br /><a href="http://lh5.ggpht.com/_i9HjVXB62LY/TES0oGAM_4I/AAAAAAAAARE/vCHecuiPz10/s1600-h/0004%5B4%5D.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="0004" border="0" alt="0004" src="http://lh5.ggpht.com/_i9HjVXB62LY/TES0oiXmK1I/AAAAAAAAARI/PfLOeeAHqvY/0004_thumb%5B2%5D.png?imgmax=800" width="609" height="182" /></a> I was able to click Fix and afterward <a href="http://forums.majorgeeks.com/showpost.php?s=3267c1d818674a91ca0f821aa6cc0b76&p=1507844&postcount=3">run ComboFix according to chaslang’s instructions</a> without ComboFix detecting the AV Security Suite. Chaslang, I owe you... something. Thank you!</p><br /><br /><p>When rebuilding or updating a home machine connected to the internet, I strongly suggest using the automated, toolbar-free installers created by <a href="http://ninite.com/">http://ninite.com/</a> Makes it easy to install Microsoft Security Essentials, Flash, FireFox, Foxit Reader, Auslogics Disk Defrag, and several other apps.<a href="http://lh3.ggpht.com/_i9HjVXB62LY/TES0o6SveyI/AAAAAAAAARM/1Ebe1jLZkMY/s1600-h/0008%5B7%5D.png"><img style="border-right-width: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; margin-left: auto; border-left-width: 0px; margin-right: auto" title="0008" border="0" alt="0008" src="http://lh4.ggpht.com/_i9HjVXB62LY/TES0paampaI/AAAAAAAAARQ/agJ5BAGaXdw/0008_thumb%5B5%5D.png?imgmax=800" width="644" height="280" /></a> Ninite will save you a lot of time.</p><br /><br /><p>Another troubleshooting suggestion is to boot Windows off a CD or USB key(<a href="http://winbuilder.net/">WinBuilder</a> and <a href="http://www.boot-land.net/forums/index.php?showtopic=8195">Boot Land</a> can help you create a bootable version of windows, but these are deep waters that will take some time to navigate for first-timers) and thereby work on the infected system in a safer environment.</p>Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-32987901623479292582010-01-11T11:48:00.002-07:002010-01-11T12:03:35.518-07:00PowerShell Power Breakfast 8:00am-9:00am, Wednesday, January 27, 2010<p>Buy your breakfast at the East Bay Cafe, have a seat, and learn about <a href="http://www.microsoft.com/powershell">PowerShell</a> for one hour.  PowerShell provides for Windows what shells like <a href="http://en.wikipedia.org/wiki/Bash">Bash</a> provide in Linux – a command line for one-off tasks or automation, be they simple or complex.  Schedule this event on your calendar, and bring your manager and/or coworkers.</p> <p>I’ll be presenting on sending emails via PowerShell, persisting and searching your command line history between PowerShell sessions, and providing a brief overview of <a href="http://www.quest.com/powershell/activeroles-server.aspx">Quest’s Active Directory cmdlets</a> functionality.</p> <p><a href="http://lh6.ggpht.com/_i9HjVXB62LY/S0tyabLZqCI/AAAAAAAAAPw/ZYhTVL3_MZk/s1600-h/PowerShell_Breakfast03%5B4%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="PowerShell_Breakfast03" border="0" alt="PowerShell_Breakfast03" src="http://lh5.ggpht.com/_i9HjVXB62LY/S0tya20CjvI/AAAAAAAAAP0/qZcIZe231-c/PowerShell_Breakfast03_thumb%5B2%5D.png?imgmax=800" width="589" height="141" /></a> </p> <p>Schwag will be given to a few lucky attendees courtesy of Redmond and local Microsoft Technology Strategist Dan See.  Thanks, Dan!</p> <p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=DF8ED469-9007-401C-85E7-46649A32D0E0&displaylang=en">Windows PowerShell Quick Reference</a> <br /> <br /><a href="http://windowsitpro.com/Windows/Articles/ArticleID/96075/pg/1/1.html">Dig Out by Digging Into PowerShell</a> <br /></p> <p>The PowerShell Power Breakfast is open to any individual interested in Windows PowerShell, from veteran developers and sysadmins to those just starting with automation & scripting in a Windows context.</p> <p><strong>Where</strong>: Novell East Bay Cafe, Building G, Provo Campus (<a href="http://eastbaycafe.com/">map</a>) </p> <p><strong>Directions</strong>: Take the University Ave exit off I-15, cross University Ave, and turn left (north) onto Novell Place and enter the Novell campus. When you drive up to bldg H (the 8-story bldg), turn left and park in the SW parking lot. The sidewalk on the west side of bldg H will take you to the cafe (bldg G). We'll be in the <strong>conference room at the far north end (past the food court)</strong>. </p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0tag:blogger.com,1999:blog-20014007.post-46614985949402343702009-11-25T15:56:00.001-07:002009-11-25T16:19:59.663-07:00Files from PowerShell Power Breakfast Kickoff Meeting<p><a href="http://lh3.ggpht.com/_i9HjVXB62LY/Sw27jORtLzI/AAAAAAAAAOo/u7_ax3GmEAY/s1600-h/image%5B2%5D.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_i9HjVXB62LY/Sw27kPFxdQI/AAAAAAAAAOs/GGuL0RPILLA/image_thumb.png?imgmax=800" width="667" height="76" /></a> </p> <p>Here is <a href="http://www.larsrasmussen.com-a.googlepages.com/PowerShellIntro.zip">zip file containing the scripts, notes, slides, and some online books used for today’s introduction to PowerShell</a>.</p> <p>Thank you Shauna Theobald and the <a href="http://www.novell.com/offices/opensourcecenter.html">Novell OSTC</a> for providing the <a href="http://eastbaycafe.com/">venue</a>!  The fourth Wednesday in December seems too close to Christmas, so I think we’ll meet again on January 27.</p> <p>Don Jones has a great video presentation entitled, <a href="http://www.idera.com/Content/Show108.aspx?s=PracPS-invite">“Getting to Know PowerShell”</a> that covers much of this morning’s material as well.</p> Lars Rasmussenhttp://www.blogger.com/profile/02436107799416632673noreply@blogger.com0