netnerds.net
Home
Book
Links icon
Data Platform GitHub Org GitHub Profile GitHub Star Profile MVP Profile Twitch
About
Subscribe
  • Reset-SqlSaPassword: Easily regain sa/sysadmin access to your SQL Servers

    Jun 7, 2015 · 2 min read  ·
    Share on:

    It's obvious that I love PowerShell and SQL Server. Together, they allow SQL Server DBA's to solve just about any problem. Most of my projects have come from questions posted in Reddit's SQL Server subreddit, including my most recent project, Reset-SqlSaPassword, which allows you to regain syadmin access to your SQL …


    Read More
  • Getting Total Number of Rows Copied in SqlBulkCopy Using PowerShell

    May 18, 2015 · 2 min read  ·
    Share on:

    Getting the total number of inserted rows for SqlBulkCopy should be easier, but I believe the easiest (and fastest) is by using reflection and some C# code within your PowerShell script. Thanks to user601543 at stackoverflow, I was able translate his code for use within one of my own scripts. The Code Here's an …


    Read More
  • Simplifying SQL Server Migrations using PowerShell

    May 15, 2015 · 1 min read  ·
    Share on:

    Recently, I did a webcast for the PowerShell Virtual Chapter of PASS on Simplifying SQL Server Migrations using PowerShell. If you're planning for a SQL Server migration, I wrote a bunch of scripts that can help, and put them all on github. Check out the sqlmigration repository, and the accompanying PowerPoint Slides. …


    Read More
  • Get SQL Server Product Keys for Local and Remote Servers using PowerShell

    Mar 22, 2015 · 1 min read  ·
    Share on:

    I just released a new PowerShell script, Get-SQLServerKeys.ps1. The script works works with several versions of SQL Server (2005-2014), and can use Central Management Server, a text file, or just a string of servers as input. Like many of the Windows Key scripts available, this one relies on Remote Registry being …


    Read More
  • Creating a WCF Net.TCP Service and Client using PowerShell

    Mar 4, 2015 · 2 min read  ·
    Share on:

    I'm currently attending Regis University for my grad degree, and just finished up a networking class. For my final, I chose to explore the Windows Net.TCP Port Sharing Service. I had this glorious vision of translating some C# code to 100% PowerShell code, but eventually gave into the fact that PowerShell doesn't …


    Read More
  • Using .NET DataTable Computes and Column Expressions in PowerShell

    Feb 3, 2015 · 5 min read  ·
    Share on:

    As a SQL Server DBA, I'm used to SQL being able to perform aliasing, super fast subselects, and easy aggregation. My most recent project, Invoke-Locate.ps1, however, uses SQLite because of its portability and speed when performing simple selects and inserts. The downside is that SQLite doesn't handle some subselects …


    Read More
  • Working with Basic .NET DataSets and DataTables in PowerShell

    Feb 1, 2015 · 3 min read  ·
    Share on:

    This is mostly for my reference, but you can use it, too :) Create Basic Datatable 1$dt = New-Object System.Data.Datatable 2[void]$dt.Columns.Add("First") 3[void]$dt.Columns.Add("Second") 4[void]$dt.Columns.Add("Third") 5 6# Add a row manually …


    Read More
  • Find Duplicates in PowerShell Datatable using LINQ

    Jan 21, 2015 · 3 min read  ·
    Share on:

    Update 1/4: Removed conversion of datatable to list. That just wasted memory, as this works on all enumerables. I don't have a practical application for this method, but I wanted to figure out how to do it anyway. Doing so was frustrating but kinda fun. It forced me to learn about lamdas in PowerShell which I'll …


    Read More
  • High-Performance Techniques for Importing CSV to SQL Server using PowerShell

    Jan 18, 2015 · 10 min read  ·
    Share on:

    If you've ever tried to use PowerShell's Import-CSV with large files, you know that it can exhaust all of your RAM. Previously, I created a script on ScriptCenter that used an alternative technique to import large CSV files, and even imported them into SQL Server at a rate of 1.7 million rows a minute. I've now gotten …


    Read More
  • Quickly Find Duplicates in Large CSV Files using PowerShell

    Jan 16, 2015 · 5 min read  ·
    Share on:

    Update 1/18/2015: This native PowerShell script can process over 165,000 rows a second. I'm so pumped. My million row CSV with 9k dupes processed in 6.4 seconds. I actually tried this using LINQ in PowerShell, but it seemed exponetially slower as the dataset grew. A user on reddit's PowerShell subreddit asked for the …


    Read More
    • ««
    • «
    • 4
    • 5
    • 6
    • 7
    • 8
    • »
    • »»

Chrissy LeMaire

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

dbatools book

Physical books ship from manning.com on June 10, 2022! Arrives in stores and Amazon on July 5 🥳. Order or preorder now.

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

  • Signing Windows Software with GitHub Actions, Encrypted Secrets and PowerShell
  • ExpressVPN on macOS: No internet detected
  • RBAR Performance in PowerShell
  • Import-DbaCsv Design Considerations
  • 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

categories

sql-server 117 powershell 109 general 63 security 59 windows 47 sharepoint 41 active-directory 37 linux 31 networking 30 vbscript 30 apple 23 virtualization 22 iis 19 apache 7 exchange 7
All Categories
active-directory37 apache7 apple23 asp-net2 bi4 db24 exchange7 general63 github4 iis19 linux31 livestreaming4 lync2 networking30 oracle1 powershell109 security59 sharepoint41 sql-server117 vbscript30 virtualization22 windows47 wpf7
[A~Z][0~9]
 

Copyright 2003 -  Chrissy LeMaire. All Rights Reserved