Skip to content

Instantly share code, notes, and snippets.

View aaronpmiller's full-sized avatar

Aaron Miller aaronpmiller

  • Minneapolis, MN
View GitHub Profile
Function Import-Excel {
<#
.Synopsis
Converts an Excel document into an array of objects with the columns as separate properties.
.Example
Import-Excel -Path .\Example.xlsx
This example would import the data stored in the Example.xlsx spreadsheet.
.Description
The Import-Excel cmdlet converts an Excel document into an array of objects whose property names are determined by the column headers and whose values are determined by the column data.
Additionally, you can specify whether this particular Excel file has any headers at all, in which case the objects will be given the property names based on their column. Likewise, if the document has headers, but one column does not, its data will be assigned a Column# property name.
@wadewegner
wadewegner / addselftosqlsysadmin.cmd
Created January 25, 2012 18:35
Script to add the current user to the sysadmin role in SQL Server
@echo off
rem
rem ****************************************************************************
rem
rem Copyright (c) Microsoft Corporation. All rights reserved.
rem This code is licensed under the Microsoft Public License.
rem THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
rem ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
rem IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
rem PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.