Skip to content

Instantly share code, notes, and snippets.

@matthewvukomanovic
matthewvukomanovic / addselftosqlsysadmin.cmd
Created May 17, 2017 — forked from wadewegner/addselftosqlsysadmin.cmd
Script to add the current user to the sysadmin role in SQL Server
View addselftosqlsysadmin.cmd
@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.