netnerds.net
Home
Book
Links icon
GitHub Org GitHub Star Profile MVP Profile Twitch
About
Subscribe
  • PowerShell: Too Many If Elses? Use Switch.

    Dec 7, 2016 · 2 min read  ·
    Share on:

    One of my favorite things in PowerShell (and other languages) is the switch statement. It's clean and a much better alternative to a ton of if elses. Ever had this happen? 1if ($state -eq -1) 2{ 3$diskstate = "Unknown" 4} 5elseif ($state -eq 0) 6{ 7$diskstate = "Inherited" 8} 9elseif ($state -eq 1) 10{ …


    Read More
  • Contributing to dbatools & dbareports using GitHub Desktop

    Dec 3, 2016 · 1 min read  ·
    Share on:

    Repost from dbatools.io: Recently, I presented to the Philadelphia PowerShell User Group about Contributing to Open Source PowerShell projects using GitHub Desktop. I chose this topic because a number of people have asked for step-by-step instructions on how to work with GitHub. I love the command line, but with Git? I …


    Read More
  • Immediately Output Runspace Results to the Pipeline

    Dec 3, 2016 · 2 min read  ·
    Share on:

    In my previous post, I presented the template I use anytime I need to add multithreading to my scripts. Recently, I had a request to add multi-threading to Read-DbaBackupHeader. This was the first runspace in which I had to output the results from the runspace to the host -- usually I just needed commands to run in the …


    Read More
  • Runspaces Simplified (as much as possible)

    Dec 3, 2016 · 5 min read  ·
    Share on:

    Last year, I was looking into multi-threading in PowerShell and, with the help of Dr. Tobias Weltner, Boe Prox and Martin Pugh ultimately decided on runspaces. Then, I presented at psconf.eu about using runspaces to speed up SQL Server/CSV imports. Runspaces took me from about 90,000 rows per second to 230,000 rows per …


    Read More
  • Guest blogger Cláudio Silva: Why Expand-SqlTLogResponsibly?

    Jul 20, 2016 · 5 min read  ·
    Share on:

    Hey yall! I invited one of the most active dbatools developers, Cláudio Silva, to do a guest post about his motivation for joining the team and why he built this particular command. So without further ado... here's Cláudio :D Hi everyone my name is Cláudio Silva, I'm a MS SQL Server DBA, and have worked with SQL …


    Read More
  • New PowerShell Commands from the SQL Server Team!

    Jul 5, 2016 · 4 min read  ·
    Share on:

    Have you seen the SQL Server Tools team's post about the PowerShell module for SQL Server? There are TWENTY FIVE new cmdlets! TWENTY FIVE! That's a 53% increase over the previous 46 cmdlets. It looks like the SQL Server community is well on its way to becoming proper citizens in the PowerShell world, and we'll reach …


    Read More
  • The PowerShell Module Formerly Known as SQLPS

    Jun 30, 2016 · 3 min read  ·
    Share on:

    I am still so floored by the additions and enhancements made to the module formerly known as SQLPS, now known as SqlServer. Not only do the new additions bring the total number of cmdlets from 46 to 71, but they align what we voted for on the Trello board. That's a 54% increase in the number of cmdlets! We'll be up to …


    Read More
  • It’s 2016, so why are you still using sp_help_revlogin?

    Jun 14, 2016 · 4 min read  ·
    Share on:

    Today's blog post is part of T-SQL Tuesday. T-SQL Tuesday is the brainchild of Adam Machanic. It is a monthly blog party on the second Tuesday of each month. Everyone is welcome to participate. sp_help_revlogin is now old enough to drive a car By now in your career, you may have needed to migrate a few databases and …


    Read More
  • Counting the number of occurrences of a string or file in PowerShell

    May 11, 2016 · 1 min read  ·
    Share on:

    I always forget how to do this, and Aleksandar Nikolić posted a really beautiful answer on Powershell.com For a file: 1-split (Get-Content .\test.txt | Out-String) | 2Where-Object { $_ -eq "test" } | Measure-Object | 3Select-Object -exp count For a string: 1$html.content -split …


    Read More
  • Keeping up with SQL Server Connect Items Marked Closed as Fixed

    May 11, 2016 · 1 min read  ·
    Share on:

    Earlier this week, I was trying to determine people's feelings about Microsoft Connect by looking through Twitter. A few scrolls down, and I came upon this @Ms_Alaina My problem is I sometimes stumble upon a Connect item I filed in 2008, and have no idea when it was closed as fixed. — Aaron Bertrand (@AaronBertrand) …


    Read More
    • ««
    • «
    • 1
    • 2
    • 3
    • 4
    • 5
    • »
    • »»

Chrissy LeMaire

SQL & PowerShell MVP. GitHub Star. Creator of dbatools. Need to oil my knees.

preorder

dbatools

dbatools is an awesome PowerShell module that helps you migrate entire instances with a single command, plus a whole lot more.

available from dbatools.io and github

dbachecks

dbachecks validates SQL Server environments using crowdsourced DBA checklists and outputs to Power BI and is available on github.com 📊

recent posts

  • Rebuilding a Proxmox cluster node
  • Default PowerShell Paths (PSModulePath) on GitHub Runners
  • Add existing directory storage to proxmox without wiping it first
  • InspecTools on Offline Windows
  • Chef inspec: Unable to detect your platform
  • Migrating my WordPress sites to GitHub Pages
  • URL Shortening/Redirects using GitHub Pages and Jekyll
  • My Windows Terminal Retro Theme

categories

sql-server 115 powershell 106 general 63 security 58 windows 47 sharepoint 41 active-directory 37 linux 31 networking 30 vbscript 30 apple 22 virtualization 22 iis 19 apache 7 exchange 7
All Categories
active-directory37 apache7 apple22 asp-net2 bi4 db24 exchange7 general63 github3 iis19 linux31 livestreaming4 lync2 networking30 oracle1 powershell106 security58 sharepoint41 sql-server115 vbscript30 virtualization22 windows47 wpf7
[A~Z][0~9]
 

Copyright 2003 -  Chrissy LeMaire. All Rights Reserved