SlideShare une entreprise Scribd logo
1  sur  26
CIS 216
Highline Community College
Dan Morrill
 Windows Server 2008 R2
 Active Directory running and configured
 Windows Power Shell
 Windows Active Directory PowerShell command list
 http://technet.microsoft.com/en-
us/library/ee617195.aspx
 A couple of users in Active Directory that we can
manipulate
 DCPromo starts up a New Active Directory Forrest
 For this case your AD should be on its own and not part
of a regular AD Domain.
 All users will be local to the isolated AD Domain
 The Domain Functional Level in this case does not
matter, you can choose 2003 or 2008
 Add DNS and all the features needed for the AD
process
 Run Active Directory Users and Computers under
Administrative Tools (start – administrative tools –
users and computers)
 We want to check out a user to see if the user exists in
AD
 Get-aduser jackfrost
 Disable-adaccount jackfrost
 Enable-adaccount jackfrost
 Type sl ad:
 You should see this prompt
 Type DIR (while in SL-AD)
 You should see this
 Set-location
“dc=instructorCIS216,dc=highline,dc=edu”
 Use the FDQN you set up when you installed Active
Directory for the location and remember the quotes
 Set-location “cn=users”
 Dir
 New-PSDrive –Name instructor –PSProvder
ActiveDirectory –Root
“ad:dc=instructorCIS216,dc=highline,dc=edu”
 Get-item
“ad:cn=users,dc=instructorCIS216,dc=highline,dc=ed
u” –Properties samAccountName
 Get-item
‘ad:cn=users,dc=instructorCIS216,dc=highline,dc=ed
u’ –Properties *
 Import-Module ActiveDirectory
$Users = Import-Csv ".myusers.csv"
foreach ($User in $Users)
{
$OU = "OU=MyUsers,OU=MyStuff,DC=mydomain,DC=local,DC=com"
$Detailedname = $User.firstname + " " + $User.lastname
$Firstname = $User.Firstname
$FirstLetterFirstname = $Firstname.substring(0,1) #not used this but left it in
$SAM = $User.Firstname.tolower() + "." + $user.lastname.tolower()
$userprinci = $SAM + "@mydomain.local.com"
$logonscript = "logscript.vbs"
$homedir = "servermyarea" + $SAM + "My Documents"
#tried this alternative
#$homedir = "servermyarea%username%My Documents"
New-ADUser -Name $Detailedname -SamAccountName $SAM -UserPrincipalName
$userprinci -DisplayName $Detailedname -GivenName
$user.firstname -Surname $user.lastname -Path $OU -HomeDrive "H:" -HomeDirectory
$homedir -scriptpath $logonscript -
PasswordNeverExpires $True -PassThru
#the password is blank on this example
}
 You have all the basic commands
 The script on the preceding page requires a CSV file of
user names
 Look at how the script was set up to determine what
should be in the CSV file, (detailedName, FirstName,
FirstLetterFirstName, SAM, ect)
 Build a CSV with those headers and enter a couple of
entries in the file
 Attempt to import
 Submit the CSV file, and a screen cap of the AD Users
Container with your new people
Windows Server 2008 R2 Active Directory PowerShell Commands
Windows Server 2008 R2 Active Directory PowerShell Commands

Contenu connexe

Tendances

Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Lar21
 
Parsing JSON with a single regex
Parsing JSON with a single regexParsing JSON with a single regex
Parsing JSON with a single regexbrian d foy
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingMatheus Marabesi
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gLeandro Santos
 
Power shell examples_v4
Power shell examples_v4Power shell examples_v4
Power shell examples_v4JoeDinaso
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongersbrian d foy
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perldeepfountainconsulting
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I thinkWim Godden
 
[Php] navigations
[Php] navigations[Php] navigations
[Php] navigationsThai Pham
 
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、GaelykでハンズオンTsuyoshi Yamamoto
 
Threading
ThreadingThreading
Threadingb290572
 
Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Lingfei Kong
 

Tendances (20)

Bag of tricks
Bag of tricksBag of tricks
Bag of tricks
 
Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18Flask - Backend com Python - Semcomp 18
Flask - Backend com Python - Semcomp 18
 
Parsing JSON with a single regex
Parsing JSON with a single regexParsing JSON with a single regex
Parsing JSON with a single regex
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com PhingDarkmira Tour PHP 2016 - Automatizando Tarefas com Phing
Darkmira Tour PHP 2016 - Automatizando Tarefas com Phing
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11g
 
Power shell examples_v4
Power shell examples_v4Power shell examples_v4
Power shell examples_v4
 
Phinx talk
Phinx talkPhinx talk
Phinx talk
 
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks  -  Baltimore Perl mongersPerl Bag of Tricks  -  Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
 
[Php] navigations
[Php] navigations[Php] navigations
[Php] navigations
 
Asynchronous programming patterns in Perl
Asynchronous programming patterns in PerlAsynchronous programming patterns in Perl
Asynchronous programming patterns in Perl
 
Add loop shortcode
Add loop shortcodeAdd loop shortcode
Add loop shortcode
 
Laravel the right way
Laravel   the right wayLaravel   the right way
Laravel the right way
 
My app is secure... I think
My app is secure... I thinkMy app is secure... I think
My app is secure... I think
 
[Php] navigations
[Php] navigations[Php] navigations
[Php] navigations
 
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
名古屋SGGAE/J勉強会 Grails、Gaelykでハンズオン
 
Threading
ThreadingThreading
Threading
 
A Gentle Introduction to Event Loops
A Gentle Introduction to Event LoopsA Gentle Introduction to Event Loops
A Gentle Introduction to Event Loops
 
Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本Shell实现的windows回收站功能的脚本
Shell实现的windows回收站功能的脚本
 
Php
PhpPhp
Php
 

En vedette

the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365Thorbjørn Værp
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Vlad Catrinescu
 
Using PowerShell for active directory management
Using PowerShell for active directory managementUsing PowerShell for active directory management
Using PowerShell for active directory managementRavikanth Chaganti
 
PowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangePowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangeMichel de Rooij
 
O365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administratorsO365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administratorsNCCOMMS
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017LinkedIn
 

En vedette (6)

the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365
 
Using PowerShell for active directory management
Using PowerShell for active directory managementUsing PowerShell for active directory management
Using PowerShell for active directory management
 
PowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for ExchangePowerShell Tips & Tricks for Exchange
PowerShell Tips & Tricks for Exchange
 
O365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administratorsO365con14 - powershell for exchange administrators
O365con14 - powershell for exchange administrators
 
The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017The Top Skills That Can Get You Hired in 2017
The Top Skills That Can Get You Hired in 2017
 

Similaire à Windows Server 2008 R2 Active Directory PowerShell Commands

Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For BeginnersJonathan Wage
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenchesLukas Smith
 
Microsoft Offical Course 20410C_04
Microsoft Offical Course 20410C_04Microsoft Offical Course 20410C_04
Microsoft Offical Course 20410C_04gameaxt
 
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQL
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQLPGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQL
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQLPGConf APAC
 
Centralising Authorisation in PostgreSQL
Centralising Authorisation in PostgreSQLCentralising Authorisation in PostgreSQL
Centralising Authorisation in PostgreSQLGary Evans
 
Vpd Virtual Private Database By Saurabh
Vpd   Virtual Private Database By SaurabhVpd   Virtual Private Database By Saurabh
Vpd Virtual Private Database By Saurabhguestd83b546
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalystsvilen.ivanov
 
Windows Server 2012 Active Directory Recovery
Windows Server 2012 Active Directory RecoveryWindows Server 2012 Active Directory Recovery
Windows Server 2012 Active Directory RecoverySerhad MAKBULOĞLU, MBA
 
Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Hossein Sarshar
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services AdministrationNapoleon NV
 
Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model BasicsJames Gray
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)arcware
 
ZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperGary Hockin
 
Advanced Ops Manager Topics
Advanced Ops Manager TopicsAdvanced Ops Manager Topics
Advanced Ops Manager TopicsMongoDB
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the TrenchesJonathan Wage
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSbuttyx
 

Similaire à Windows Server 2008 R2 Active Directory PowerShell Commands (20)

Doctrine For Beginners
Doctrine For BeginnersDoctrine For Beginners
Doctrine For Beginners
 
AD Cmdlets
AD CmdletsAD Cmdlets
AD Cmdlets
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 
Microsoft Offical Course 20410C_04
Microsoft Offical Course 20410C_04Microsoft Offical Course 20410C_04
Microsoft Offical Course 20410C_04
 
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQL
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQLPGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQL
PGConf APAC 2018 - Lightening Talk #2 - Centralizing Authorization in PostgreSQL
 
Centralising Authorisation in PostgreSQL
Centralising Authorisation in PostgreSQLCentralising Authorisation in PostgreSQL
Centralising Authorisation in PostgreSQL
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
 
Vpd Virtual Private Database By Saurabh
Vpd   Virtual Private Database By SaurabhVpd   Virtual Private Database By Saurabh
Vpd Virtual Private Database By Saurabh
 
Terraform Cosmos DB
Terraform Cosmos DBTerraform Cosmos DB
Terraform Cosmos DB
 
Web applications with Catalyst
Web applications with CatalystWeb applications with Catalyst
Web applications with Catalyst
 
Windows Server 2012 Active Directory Recovery
Windows Server 2012 Active Directory RecoveryWindows Server 2012 Active Directory Recovery
Windows Server 2012 Active Directory Recovery
 
Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level Centralizing users’ authentication at Active Directory level 
Centralizing users’ authentication at Active Directory level 
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services Administration
 
Rails Model Basics
Rails Model BasicsRails Model Basics
Rails Model Basics
 
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
10 Things Every Plugin Developer Should Know (WordCamp Atlanta 2013)
 
ZF2 for the ZF1 Developer
ZF2 for the ZF1 DeveloperZF2 for the ZF1 Developer
ZF2 for the ZF1 Developer
 
Advanced Ops Manager Topics
Advanced Ops Manager TopicsAdvanced Ops Manager Topics
Advanced Ops Manager Topics
 
Symfony2 from the Trenches
Symfony2 from the TrenchesSymfony2 from the Trenches
Symfony2 from the Trenches
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJS
 

Plus de Dan Morrill

Understanding web site analytics
Understanding web site analyticsUnderstanding web site analytics
Understanding web site analyticsDan Morrill
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingDan Morrill
 
Understanding UNIX CASE and TPUT
Understanding UNIX CASE and TPUTUnderstanding UNIX CASE and TPUT
Understanding UNIX CASE and TPUTDan Morrill
 
Information security principles
Information security principlesInformation security principles
Information security principlesDan Morrill
 
Using Regular Expressions in Grep
Using Regular Expressions in GrepUsing Regular Expressions in Grep
Using Regular Expressions in GrepDan Morrill
 
Understanding the security_organization
Understanding the security_organizationUnderstanding the security_organization
Understanding the security_organizationDan Morrill
 
You should ask before copying that media
You should ask before copying that mediaYou should ask before copying that media
You should ask before copying that mediaDan Morrill
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scriptingDan Morrill
 
Understanding advanced persistent threats (APT)
Understanding advanced persistent threats (APT)Understanding advanced persistent threats (APT)
Understanding advanced persistent threats (APT)Dan Morrill
 
AWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewAWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewDan Morrill
 
What is cloud computing
What is cloud computingWhat is cloud computing
What is cloud computingDan Morrill
 
Social Media Plan for CityU of Seattle
Social Media Plan for CityU of SeattleSocial Media Plan for CityU of Seattle
Social Media Plan for CityU of SeattleDan Morrill
 
Case Studies In Social Media Chinese
Case Studies In Social Media ChineseCase Studies In Social Media Chinese
Case Studies In Social Media ChineseDan Morrill
 
Case Studies In Social Media
Case Studies In Social MediaCase Studies In Social Media
Case Studies In Social MediaDan Morrill
 
Turn On Tune In Step Out
Turn On Tune In Step OutTurn On Tune In Step Out
Turn On Tune In Step OutDan Morrill
 
Technology And The Future Of Management
Technology And The Future Of ManagementTechnology And The Future Of Management
Technology And The Future Of ManagementDan Morrill
 

Plus de Dan Morrill (17)

Understanding web site analytics
Understanding web site analyticsUnderstanding web site analytics
Understanding web site analytics
 
Process monitoring in UNIX shell scripting
Process monitoring in UNIX shell scriptingProcess monitoring in UNIX shell scripting
Process monitoring in UNIX shell scripting
 
Understanding UNIX CASE and TPUT
Understanding UNIX CASE and TPUTUnderstanding UNIX CASE and TPUT
Understanding UNIX CASE and TPUT
 
Information security principles
Information security principlesInformation security principles
Information security principles
 
Using Regular Expressions in Grep
Using Regular Expressions in GrepUsing Regular Expressions in Grep
Using Regular Expressions in Grep
 
Understanding the security_organization
Understanding the security_organizationUnderstanding the security_organization
Understanding the security_organization
 
You should ask before copying that media
You should ask before copying that mediaYou should ask before copying that media
You should ask before copying that media
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
Understanding advanced persistent threats (APT)
Understanding advanced persistent threats (APT)Understanding advanced persistent threats (APT)
Understanding advanced persistent threats (APT)
 
AWS Hadoop and PIG and overview
AWS Hadoop and PIG and overviewAWS Hadoop and PIG and overview
AWS Hadoop and PIG and overview
 
What is cloud computing
What is cloud computingWhat is cloud computing
What is cloud computing
 
Social Media Plan for CityU of Seattle
Social Media Plan for CityU of SeattleSocial Media Plan for CityU of Seattle
Social Media Plan for CityU of Seattle
 
BSIS Overview
BSIS OverviewBSIS Overview
BSIS Overview
 
Case Studies In Social Media Chinese
Case Studies In Social Media ChineseCase Studies In Social Media Chinese
Case Studies In Social Media Chinese
 
Case Studies In Social Media
Case Studies In Social MediaCase Studies In Social Media
Case Studies In Social Media
 
Turn On Tune In Step Out
Turn On Tune In Step OutTurn On Tune In Step Out
Turn On Tune In Step Out
 
Technology And The Future Of Management
Technology And The Future Of ManagementTechnology And The Future Of Management
Technology And The Future Of Management
 

Dernier

Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationdeepaannamalai16
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfErwinPantujan2
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 

Dernier (20)

INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Congestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentationCongestive Cardiac Failure..presentation
Congestive Cardiac Failure..presentation
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdfVirtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
Virtual-Orientation-on-the-Administration-of-NATG12-NATG6-and-ELLNA.pdf
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 

Windows Server 2008 R2 Active Directory PowerShell Commands

  • 1. CIS 216 Highline Community College Dan Morrill
  • 2.  Windows Server 2008 R2  Active Directory running and configured  Windows Power Shell  Windows Active Directory PowerShell command list  http://technet.microsoft.com/en- us/library/ee617195.aspx  A couple of users in Active Directory that we can manipulate
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.  DCPromo starts up a New Active Directory Forrest  For this case your AD should be on its own and not part of a regular AD Domain.  All users will be local to the isolated AD Domain  The Domain Functional Level in this case does not matter, you can choose 2003 or 2008  Add DNS and all the features needed for the AD process  Run Active Directory Users and Computers under Administrative Tools (start – administrative tools – users and computers)
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.  We want to check out a user to see if the user exists in AD  Get-aduser jackfrost
  • 14.  Disable-adaccount jackfrost  Enable-adaccount jackfrost
  • 15.  Type sl ad:  You should see this prompt
  • 16.  Type DIR (while in SL-AD)  You should see this
  • 17.  Set-location “dc=instructorCIS216,dc=highline,dc=edu”  Use the FDQN you set up when you installed Active Directory for the location and remember the quotes
  • 18.
  • 20.  New-PSDrive –Name instructor –PSProvder ActiveDirectory –Root “ad:dc=instructorCIS216,dc=highline,dc=edu”
  • 23.  Import-Module ActiveDirectory $Users = Import-Csv ".myusers.csv" foreach ($User in $Users) { $OU = "OU=MyUsers,OU=MyStuff,DC=mydomain,DC=local,DC=com" $Detailedname = $User.firstname + " " + $User.lastname $Firstname = $User.Firstname $FirstLetterFirstname = $Firstname.substring(0,1) #not used this but left it in $SAM = $User.Firstname.tolower() + "." + $user.lastname.tolower() $userprinci = $SAM + "@mydomain.local.com" $logonscript = "logscript.vbs" $homedir = "servermyarea" + $SAM + "My Documents" #tried this alternative #$homedir = "servermyarea%username%My Documents" New-ADUser -Name $Detailedname -SamAccountName $SAM -UserPrincipalName $userprinci -DisplayName $Detailedname -GivenName $user.firstname -Surname $user.lastname -Path $OU -HomeDrive "H:" -HomeDirectory $homedir -scriptpath $logonscript - PasswordNeverExpires $True -PassThru #the password is blank on this example }
  • 24.  You have all the basic commands  The script on the preceding page requires a CSV file of user names  Look at how the script was set up to determine what should be in the CSV file, (detailedName, FirstName, FirstLetterFirstName, SAM, ect)  Build a CSV with those headers and enter a couple of entries in the file  Attempt to import  Submit the CSV file, and a screen cap of the AD Users Container with your new people

Notes de l'éditeur

  1. http://asdirkseesit.blogspot.com/2012/10/powershell-bulk-adding-users-active.html
  2. http://asdirkseesit.blogspot.com/2012/10/powershell-bulk-adding-users-active.html