Add User to Administrators Group using SQL Lookup Table



Similar documents
Setup and configuration for Intelicode. SQL Server Express

AddLocalUser AddLocalGroup AddLocalUserToLocalGroup AddDomainUserToLocalGroup AddDomainGroupToLocalGroup

Wazza s QuickStart 17. Leopard Server - Blogs & Wikis

Using a Remote SQL Server Best Practices

Alert Notification of Critical Results (ANCR) Public Domain Deployment Instructions

LT Auditor Windows Assessment SP1 Installation & Configuration Guide

Preparing a Windows 7 Gold Image for Unidesk

Setting up VMware ESXi for 2X VirtualDesktopServer Manual

How To - Implement Single Sign On Authentication with Active Directory

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Installation Guide. . All right reserved. For more information about Specops Deploy and other Specops products, visit

Upgrade Guide BES12. Version 12.1

ADFS 2.0 Application Director Blueprint Deployment Guide

Installing LearningBay Enterprise Part 2

MSSQL quick start guide

Setting Up ALERE with Client/Server Data

Installing and Configuring Login PI

Deployment of Keepit for Windows

Other documents in this series are available at: servernotes.wazmac.com

Setup Guide for AD FS 3.0 on the Apprenda Platform

StarWind iscsi SAN Software: Installing StarWind on Windows Server 2008 R2 Server Core

SQL Server 2008 R2 Express Edition Installation Guide

Tutorial: How to Use SQL Server Management Studio from Home

Open Directory. Contents. Before You Start 2. Configuring Rumpus 3. Testing Accessible Directory Service Access 4. Specifying Home Folders 4

Video Administration Backup and Restore Procedures

IPRO Viewer. Installation

Installing Active Directory

Transferring Your Hosting Account

Avatier Identity Management Suite

TECHNICAL NOTE. The following information is provided as a service to our users, customers, and distributors.

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

Approved SCOM Health Check Report Installation Guide

Password Reset Server Installation Guide Windows 8 / 8.1 Windows Server 2012 / R2

TIGERPAW EXCHANGE INTEGRATOR SETUP GUIDE V3.6.0 August 26, 2015

Installing and Configuring vcloud Connector

VITAL SIGNS Quick Start Guide

Specops Command. Installation Guide

National Fire Incident Reporting System (NFIRS 5.0) NFIRS Data Entry/Validation Tool Users Guide

Using Internet or Windows Explorer to Upload Your Site

PaperStream Connect. Setup Guide. Version Copyright Fujitsu

FUSION Installation Guide

SOA Software API Gateway Appliance 7.1.x Administration Guide

Wharf T&T Cloud Backup Service User & Installation Guide

Step-by-step installation guide for monitoring untrusted servers using Operations Manager ( Part 3 of 3)

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Web based training for field technicians can be arranged by calling These Documents are required for a successful install:

4cast Server Specification and Installation

IIS, FTP Server and Windows

Searching for accepting?

Sysax Multi Server User manual

Secure Messaging Server Console... 2

Mobile Labs Plugin for IBM Urban Code Deploy

Paperless Meeting Software Installation Instructions

How To Configure CU*BASE Encryption

Installation of ADS SiMKit startup script and designkit on Windows for SiMKit version 4.4

Immotec Systems, Inc. SQL Server 2005 Installation Document

What you will need before beginning this guide

NAS 206 Using NAS with Windows Active Directory

SecureAware on IIS8 on Windows Server 2008/- 12 R2-64bit

Setting Up a Backup Domain Controller

Deployment Guide: Unidesk and Hyper- V

Version 1.0 Revision MODBUS/TCP Ethernet Communication Interface API for the Intelligent Instrumentation WinCE Platform SETUP MANUAL

Avatier Identity Management Suite

Installation & Configuration Guide Version 1.0. TekSIP Route Server Version Installation & Configuration Guide

MySQL Quick Start Guide

Every Silver Lining Has a Vault in the Cloud

RSA Authentication Manager 8.1 Virtual Appliance Getting Started

Installing the ASP.NET VETtrak APIs onto IIS 5 or 6

EBSCO MEDIA FILE TRANSFER SOFTWARE INSTALLATION INSTRUCTIONS

Pearl Echo Installation Checklist

CloudPortal Services Manager Version 11.0 CU1 Deployment Guide

Web Service for Observer. Installation Manual. Part No Revision A

OneStop Reporting 3.7 Installation Guide. Updated:

Thinspace deskcloud. Quick Start Guide

Reflection DBR USER GUIDE. Reflection DBR User Guide. 995 Old Eagle School Road Suite 315 Wayne, PA USA

CloudPortal Services Manager Version 11.0 CU2 Deployment Guide

WSNetServer User Manual. Date: July

Active Directory Cleaner User Guide 1. Active Directory Cleaner User Guide

How To Enable A Websphere To Communicate With Ssl On An Ipad From Aaya One X Portal On A Pc Or Macbook Or Ipad (For Acedo) On A Network With A Password Protected (

Getting Started with the Ed-Fi ODS and Ed-Fi ODS API

Customer Control Panel Manual

NetBoot/SUS Appliance User Guide. Version 1.0

Using LifeSize systems with Microsoft Office Communications Server Server Setup

INSTALLING AND MANAGING DATABASES WITH PRIMAVERA P6 PRO RELEASE 8.2

SOFTWARE INSTALLATION INSTRUCTIONS CLIENT/SERVER EDITION AND WEB COMPONENT VERSION 10

National Fire Incident Reporting System (NFIRS 5.0) NFIRS Data Entry/Validation Tool Users Guide

DeployStudio Server Quick Install

USING MYWEBSQL FIGURE 1: FIRST AUTHENTICATION LAYER (ENTER YOUR REGULAR SIMMONS USERNAME AND PASSWORD)

This presentation explains how to integrate Microsoft Active Directory to enable LDAP authentication in the IBM InfoSphere Master Data Management

Quick Start Guide. User Manual. 1 March 2012

Installing and Configuring vcloud Connector

Capture Pro Software FTP Server System Output

Remote Administration

enter the administrator user name and password for that domain.

How to Scale out SharePoint Server 2007 from a single server farm to a 3 server farm with Microsoft Network Load Balancing on the Web servers.

Insight Video Net. LLC. CMS 2.0. Quick Installation Guide

How to Setup and Connect to an FTP Server Using FileZilla. Part I: Setting up the server

MDM Mass Configuration Tool User s Manual

Transcription:

Add User to Administrators Group using SQL Lookup Table Summary This utility is intended to aid customers in the ability to make the user of a desktop a local administrator on the desktop. In order to script this there must be a way for the script to know which user should be defined as the administrator of the desktop. This can be done in many ways but for this process a SQL server lookup table is used to match the user to the desktop. Then a PowerShell script is added to the startup files of the desktop that will look up the desktop name in the lookup table and add the appropriate user to the local administrators group. Included in this package are a utility to manage the database table and the PowerShell script to add to the desktops. The script can be added to the OS layer for Unidesk desktops but it could also be run from a startup script on any desktop for those that do not use Unidesk. Assumption/Requirements 1. PowerShell 2.0 or later on desktop 2. Microsoft SQL Server Installing and Setting up the Utility Create a folder on your desktop and unzip the files. Create a sql database using the script found later in this document or to similar specification. Then run the management utility to define the database settinsg and create the configuration fiel used by the script. Check Script for Blocking Before unpacking check the properties of the zip file to see if they may be blocked as shown on the right. If they are click unblock. This will unblock all of the files as long as you unblock the zip before you extract the files. Version 1.0 April 15, 2014 Page 1

Create the SQL Database The requirements for the database are very minimal. There need to be a database with one table and three fields. The names are configurable. In our example we called the Database AssignDesktop and the table DesktopAssignments. We then created three columns User, Desktop and Domain. If desired this SQL script can be used to create the table. First create the Database in SQL Manager. Then run this query. USE [AssignDesktop] /****** Object: Table [dbo].[desktopassignment] Script Date: 04/15/2014 12:44:09 ******/ SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON SET ANSI_PADDING ON CREATE TABLE [dbo].[desktopassignment]( [User] [varchar](100) NULL, [Desktop] [varchar](15) NULL, [Domain] [varchar](100) NULL ) ON [PRIMARY] SET ANSI_PADDING OFF Database Permission In your database you will need two accounts. One that has only db_datareader permissions and one that has read and write permissions. I used db_owner for the later. The first is used by the script to perform lookups in the database to match the user of a desktop to the desktop name. The second is used by the management utility to view, add and edit entries in the database. Version 2.0 April 30, 2014 Page 2

Setup Utility Once unpacked there is an application called AddToAdminGroupSQL.exe. Double click this application and click on Settings. The following screen will open. Enter the information that matches the database you created. Version 1.0 April 30, 2014 Page 3

Listing and Searching The utility provides the ability to list all the assignment entries and to search for a particular entry or a wildcard entry. The wildcard character for SQL server is the % character. Therefore to find all desktops starting with mrk enter mrk% in the desktop field and click the search button. You can also add single entries form this interface. To add a single desktop fill in the Desktop Name, User Name, Domain Name and click add. If you have set a default domain it will be used. If you have not set a default then you can support multiple domains by adding the appropriate domain here. Version 2.0 April 30, 2014 Page 4

Use the Utility to Bulk Load Data After creating the database and configuring the utility you can add user/desktop entries to the table. This can be performed in bulk from a csv file or the Unidesk MA Database from the UI. To Add entries in bulk create a csv file using excel. The file should have three columns. The order of the columns must be Domain, User, Desktop and the file must be named bulkadd.csv and it must be stored in the directory with the utility. Click on the Get CSV button to import the desktop assignments into the list. Then use the Upload to SQL to add the desired records to the assignment table. You can select and deselect records to include before uploading. Version 1.0 April 30, 2014 Page 5

In order to load records to the UI from the Unidesk MA Database click Get Unidesk after entering the Management Appliance FQDN or IP address and password. If the appliance root password has not been changed leave the password field blank and the default Password will be used. Again after retrieving the list, records can be selected or deselected. When ready use the Upload To SQL function to load the selected records into the SQL table. Configuring the PowerShell Script on the Desktop After the database is configured and data entered you can deploy the script to the desktops. For a Unidesk desktop the best place to add the script is in the OS layer by modifying the kmssetup.cmd script. This script rusn during every boot. Add a version to the OS layer then open c:\windows\setup\scripts\kmsdir and copy the PowerShell script and the configuration file into the kmsdir folder. Then at the bottom of the kmssetup.cmd where it runs commands during every boot add the following. The script first checks to see if the user is in the group and if not adds them in. The script will create a log file in the kmsdir folder for troubleshooting issues. Version 2.0 April 30, 2014 Page 6