SlideShare une entreprise Scribd logo
1  sur  18
PowerShell for Managing Active Directory Ravikanth C
About me Lead Engineer at Dell Windows PowerShell MVP Developer on several PowerShell projects on Codeplex Author of Free eBook: Layman’s guide to PowerShell 2.0 remoting Co-author on Quest’s SharePoint 2010 & PowerShell cheat sheet Blog at http://www.ravichaganti.com/blog Founder & editor of PowerShellFromIndia More details on this soon 
Giving away.. Two copies (eBook) of  Managing Active Directory with Windows PowerShell: TFM Thanks to Sapien Press One copy (eBook) of  Windows PowerShell Cookbook Thanks to O'Reilly Media
PowerShell for Active Directory [ADSI] adapter In-box Windows Server 2008 R2 includes a PowerShell module In-box Quest Software ActiveRoles Management Shell Free download Softerra Adaxes 2010.2 Commercial product Idera Scripts for Active Directory Free; uses [ADSI]
PowerShell for Active Directory Microsoft cmdlets Quest cmdlets PowerShell 2.0 only Require AD Management Gateway for managing pre-Windows 2008 R2 DC Cannot manage local LDS Cannot manage terminal services attributes Version Independent Support Windows 2003, 2008, and 2008 R2 DC management Can manage local LDS Can manage terminal services attributes
Microsoft cmdlets for Active Directory In-box from Windows Server 2008 R2 onwards Get enabled by Installing AD DS or LDS server roles or Running DCPromo.exe or Installing RSAT on Windows Server 2008 R2 or Windows 7 To access AD cmdlets Start->Administrative Tools->Active Directory Module for Windows PowerShell or  Import-Module ActiveDirectory To list AD cmdlets Get-Command -noun AD* or Get-Command –Module ActiveDirectory
Managing down level servers ,[object Object]
AD PowerShell cmdlets & ADAC use AD web servicesto administer directory
Available for Windows2003 R2 with SP22003 SP220082008 SP2 ,[object Object]
Forest & Domains Get-ADForest Set-ADForest Set-ADForestMode Get-ADDomain Set-ADDomainMode
User Accounts Get-ADUser New-ADUser Set-ADUser Remove-ADUser Disable-ADAccount Enable-ADAccount Set-ADAccountExpiration Clear-ADAccountExpiration Set-ADAccountPassword Unlock-ADAccount
Groups Get-ADGroup New-ADGroup Set-ADGroup Remove-ADGroup Get-ADGroupMember Add-ADGroupMember Remove-ADGroupMember
OU tasks Get-ADOrganizationalUnit New- ADOrganizationalUnit
Service Accounts Get-ADServiceAccount New-ADServiceAccount Set-ADServiceAccount  Install-ADServiceAccount  Uninstall-ADServiceAccount  Reset-ADServiceAccountPassword
AD Recycle Bin Enable AD Optional Feature: “Recycle Bin Feature” This is an irreversible action Restore-ADObject to restore deleted objects
Moving an AD Object Use Get-ADObject to get an instance Pipe it to Move-ADObject and specify new location as a value to -TargetPath
Learning Resources – PowerShell for AD Cmdlet reference Book: Managing Active Directory with PowerShell: TFM AD cmdlets quick reference guide Adaxes Cmdlets Quest Cmdlets Idera PowerShell Scripts ADMGS for down level servers
Learning resources - PowerShell Getting started guide PowerShell Learning center The scripting Guys blog PowerScripting Podcast PowerShell.com free online eBook

Contenu connexe

Tendances

New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0Dima Maleev
 
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code DeployAWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code DeployAdam Book
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security developmentSynapseindiappsdevelopment
 
Building & managing wa app wely
Building & managing wa app   welyBuilding & managing wa app   wely
Building & managing wa app welySpiffy
 
Integration of linked in using mule esb
Integration of linked in using mule esbIntegration of linked in using mule esb
Integration of linked in using mule esbSanjeet Pandey
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBSanjeet Pandey
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with muleF K
 
Mule using Salesforce
Mule using SalesforceMule using Salesforce
Mule using SalesforceKhasim Cise
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance TopicsAli Taki
 
Mule
MuleMule
MuleF K
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.NetHitesh Santani
 
Creating AppStream apps and configuring users with Domain Join.
Creating AppStream apps  and configuring users with Domain Join.Creating AppStream apps  and configuring users with Domain Join.
Creating AppStream apps and configuring users with Domain Join.Subramanyam Vemala
 
Integration with Microsoft CRM using Mule ESB
Integration with Microsoft CRM using Mule ESBIntegration with Microsoft CRM using Mule ESB
Integration with Microsoft CRM using Mule ESBSanjeet Pandey
 
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabConfigure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabVinh Nguyen
 

Tendances (20)

New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0New Features Of ASP.Net 4 0
New Features Of ASP.Net 4 0
 
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code DeployAWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
AWS Atlanta meetup Build Tools - Code Commit, Code Build, Code Deploy
 
SynapseIndia dotnet website security development
SynapseIndia  dotnet website security developmentSynapseIndia  dotnet website security development
SynapseIndia dotnet website security development
 
Play with force.com metadata
Play with force.com metadataPlay with force.com metadata
Play with force.com metadata
 
Building & managing wa app wely
Building & managing wa app   welyBuilding & managing wa app   wely
Building & managing wa app wely
 
Web controls
Web controlsWeb controls
Web controls
 
Integration of linked in using mule esb
Integration of linked in using mule esbIntegration of linked in using mule esb
Integration of linked in using mule esb
 
Integration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESBIntegration with Microsoft SharePoint using Mule ESB
Integration with Microsoft SharePoint using Mule ESB
 
Automatic documentation with mule
Automatic documentation with muleAutomatic documentation with mule
Automatic documentation with mule
 
Mule using Salesforce
Mule using SalesforceMule using Salesforce
Mule using Salesforce
 
Asp Net Advance Topics
Asp Net Advance TopicsAsp Net Advance Topics
Asp Net Advance Topics
 
Siebel Web Service
Siebel Web ServiceSiebel Web Service
Siebel Web Service
 
Microsoft Azure
Microsoft AzureMicrosoft Azure
Microsoft Azure
 
Mule
MuleMule
Mule
 
Server Controls of ASP.Net
Server Controls of ASP.NetServer Controls of ASP.Net
Server Controls of ASP.Net
 
Creating AppStream apps and configuring users with Domain Join.
Creating AppStream apps  and configuring users with Domain Join.Creating AppStream apps  and configuring users with Domain Join.
Creating AppStream apps and configuring users with Domain Join.
 
Integration with Microsoft CRM using Mule ESB
Integration with Microsoft CRM using Mule ESBIntegration with Microsoft CRM using Mule ESB
Integration with Microsoft CRM using Mule ESB
 
Android dev tips
Android dev tipsAndroid dev tips
Android dev tips
 
ASP.NET Web form
ASP.NET Web formASP.NET Web form
ASP.NET Web form
 
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test LabConfigure an Integrated Exchange, Lync, and SharePoint Test Lab
Configure an Integrated Exchange, Lync, and SharePoint Test Lab
 

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
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directoryDan Morrill
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Vlad Catrinescu
 
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...Patrick Guimonet
 
2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec Powershell2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec PowershellPatrick Guimonet
 
Power Shell V2 en action - avec Posh Board 2.0
Power Shell V2 en action - avec Posh Board 2.0Power Shell V2 en action - avec Posh Board 2.0
Power Shell V2 en action - avec Posh Board 2.0Patrick Guimonet
 
F Les Scripts En Power Shell
F Les Scripts En Power ShellF Les Scripts En Power Shell
F Les Scripts En Power ShellUGAIA
 
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...Microsoft Technet France
 
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
 
Cao COMT manuscript
Cao COMT manuscriptCao COMT manuscript
Cao COMT manuscriptyufeicao
 
Powershell
PowershellPowershell
PowershellUGAIA
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShellDale Lane
 
Comment automatiser les commandes PowerShell pour optimiser la performance d'...
Comment automatiser les commandes PowerShell pour optimiser la performance d'...Comment automatiser les commandes PowerShell pour optimiser la performance d'...
Comment automatiser les commandes PowerShell pour optimiser la performance d'...Microsoft Décideurs IT
 
Shell sans les coquilles
Shell sans les coquillesShell sans les coquilles
Shell sans les coquillesÉdouard Lopez
 
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 (19)

the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365the Stairway to PowerShell in Office365
the Stairway to PowerShell in Office365
 
Windows power shell and active directory
Windows power shell and active directoryWindows power shell and active directory
Windows power shell and active directory
 
Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365Collab365: PowerShell for Office 365
Collab365: PowerShell for Office 365
 
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...
Réduisez vos Coûts d'Administration et les Risques d'erreurs avec Windows Pow...
 
2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec Powershell2008-09-30 Administration automatisée avec Powershell
2008-09-30 Administration automatisée avec Powershell
 
Powershell et les techniques de remoting
Powershell et les techniques de remoting Powershell et les techniques de remoting
Powershell et les techniques de remoting
 
Power Shell V2 en action - avec Posh Board 2.0
Power Shell V2 en action - avec Posh Board 2.0Power Shell V2 en action - avec Posh Board 2.0
Power Shell V2 en action - avec Posh Board 2.0
 
F Les Scripts En Power Shell
F Les Scripts En Power ShellF Les Scripts En Power Shell
F Les Scripts En Power Shell
 
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...
Automatisez rapidement vos opérations IT, on-premise ou dans le Cloud avec Az...
 
Powershell Demo Presentation
Powershell Demo PresentationPowershell Demo Presentation
Powershell Demo Presentation
 
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
 
Cao COMT manuscript
Cao COMT manuscriptCao COMT manuscript
Cao COMT manuscript
 
Powershell
PowershellPowershell
Powershell
 
An Introduction to Windows PowerShell
An Introduction to Windows PowerShellAn Introduction to Windows PowerShell
An Introduction to Windows PowerShell
 
Comment automatiser les commandes PowerShell pour optimiser la performance d'...
Comment automatiser les commandes PowerShell pour optimiser la performance d'...Comment automatiser les commandes PowerShell pour optimiser la performance d'...
Comment automatiser les commandes PowerShell pour optimiser la performance d'...
 
Shell sans les coquilles
Shell sans les coquillesShell sans les coquilles
Shell sans les coquilles
 
Sp summit2014 session 10-2
Sp summit2014   session 10-2Sp summit2014   session 10-2
Sp summit2014 session 10-2
 
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 à Using PowerShell for active directory management

SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?
SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?
SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?Louis Göhl
 
Installation and Adminstration of AD_MVP Padman
Installation and Adminstration of AD_MVP PadmanInstallation and Adminstration of AD_MVP Padman
Installation and Adminstration of AD_MVP PadmanQuek Lilian
 
Active Directory 2008 R2 Updates
Active Directory 2008 R2 UpdatesActive Directory 2008 R2 Updates
Active Directory 2008 R2 UpdatesAmit Gatenyo
 
E brochure it254_actived2012
E brochure it254_actived2012E brochure it254_actived2012
E brochure it254_actived2012I-r Papa
 
Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1chenley
 
Project Server 2002 Implementation Lessons Learned
Project Server 2002 Implementation Lessons LearnedProject Server 2002 Implementation Lessons Learned
Project Server 2002 Implementation Lessons Learnedwebhostingguy
 
Office 365 Directory Synchronization
Office 365 Directory SynchronizationOffice 365 Directory Synchronization
Office 365 Directory Synchronizationamitvasu
 
Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)ÇözümPARK
 
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney BuikeMake Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney BuikeMake Web Not War
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services AdministrationNapoleon NV
 
Material modulo01 asf6501(6419-a_01)
Material   modulo01 asf6501(6419-a_01)Material   modulo01 asf6501(6419-a_01)
Material modulo01 asf6501(6419-a_01)JSantanderQ
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellConcentrated Technology
 
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...Microsoft TechNet
 
Windows Server 2008 R2 Overview
Windows Server 2008 R2 OverviewWindows Server 2008 R2 Overview
Windows Server 2008 R2 OverviewJaguaraci Silva
 
Windows Server 2012 R2 Jump Start - Intro
Windows Server 2012 R2 Jump Start - IntroWindows Server 2012 R2 Jump Start - Intro
Windows Server 2012 R2 Jump Start - IntroPaulo Freitas
 
Building & Managing Windows Azure
Building & Managing Windows AzureBuilding & Managing Windows Azure
Building & Managing Windows AzureK.Mohamed Faizal
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShellAdam Preston
 

Similaire à Using PowerShell for active directory management (20)

SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?
SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?
SIA319 What's Windows Server 2008 R2 Going to Do for Your Active Directory?
 
Installation and Adminstration of AD_MVP Padman
Installation and Adminstration of AD_MVP PadmanInstallation and Adminstration of AD_MVP Padman
Installation and Adminstration of AD_MVP Padman
 
Active Directory 2008 R2 Updates
Active Directory 2008 R2 UpdatesActive Directory 2008 R2 Updates
Active Directory 2008 R2 Updates
 
E brochure it254_actived2012
E brochure it254_actived2012E brochure it254_actived2012
E brochure it254_actived2012
 
Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1Ws08 R2 Itpro Session 1 Technical Overview Part1
Ws08 R2 Itpro Session 1 Technical Overview Part1
 
AD Cmdlets
AD CmdletsAD Cmdlets
AD Cmdlets
 
Project Server 2002 Implementation Lessons Learned
Project Server 2002 Implementation Lessons LearnedProject Server 2002 Implementation Lessons Learned
Project Server 2002 Implementation Lessons Learned
 
Office 365 Directory Synchronization
Office 365 Directory SynchronizationOffice 365 Directory Synchronization
Office 365 Directory Synchronization
 
Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)Windows Server 2008 (Active Directory Yenilikleri)
Windows Server 2008 (Active Directory Yenilikleri)
 
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney BuikeMake Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
Make Web, Not War - Installfest: Extend Your Web Server, Rodney Buike
 
Automating AD Domain Services Administration
Automating AD Domain Services AdministrationAutomating AD Domain Services Administration
Automating AD Domain Services Administration
 
Material modulo01 asf6501(6419-a_01)
Material   modulo01 asf6501(6419-a_01)Material   modulo01 asf6501(6419-a_01)
Material modulo01 asf6501(6419-a_01)
 
Automating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShellAutomating Active Directory mgmt in PowerShell
Automating Active Directory mgmt in PowerShell
 
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
Automating Desktop Management with Windows Powershell V2.0 and Group Policy M...
 
Windows Server 2008 R2 Overview
Windows Server 2008 R2 OverviewWindows Server 2008 R2 Overview
Windows Server 2008 R2 Overview
 
Windows Server 2012 R2 Jump Start - Intro
Windows Server 2012 R2 Jump Start - IntroWindows Server 2012 R2 Jump Start - Intro
Windows Server 2012 R2 Jump Start - Intro
 
Windows PowerShell
Windows PowerShellWindows PowerShell
Windows PowerShell
 
PowerShell Webinar
PowerShell WebinarPowerShell Webinar
PowerShell Webinar
 
Building & Managing Windows Azure
Building & Managing Windows AzureBuilding & Managing Windows Azure
Building & Managing Windows Azure
 
Intro to PowerShell
Intro to PowerShellIntro to PowerShell
Intro to PowerShell
 

Plus de Ravikanth Chaganti

Tests Driven PowerShell Learning
Tests Driven PowerShell LearningTests Driven PowerShell Learning
Tests Driven PowerShell LearningRavikanth Chaganti
 
PowerShell Data as File System
PowerShell Data as File SystemPowerShell Data as File System
PowerShell Data as File SystemRavikanth Chaganti
 
Microsoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsMicrosoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsRavikanth Chaganti
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationRavikanth Chaganti
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDRavikanth Chaganti
 
PowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationPowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationRavikanth Chaganti
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Ravikanth Chaganti
 
Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Ravikanth Chaganti
 
Cloud Computing for IT professionals
Cloud Computing for IT professionalsCloud Computing for IT professionals
Cloud Computing for IT professionalsRavikanth Chaganti
 
Introduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeIntroduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeRavikanth Chaganti
 
Cross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationCross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationRavikanth Chaganti
 
Windows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaWindows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaRavikanth Chaganti
 
Whats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VWhats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VRavikanth Chaganti
 
Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to WindowsRavikanth Chaganti
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaRavikanth Chaganti
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanthRavikanth Chaganti
 

Plus de Ravikanth Chaganti (20)

Azure Bicep - An Introduction
Azure Bicep - An IntroductionAzure Bicep - An Introduction
Azure Bicep - An Introduction
 
Azure CLI 2.0 Tips and Tricks
Azure CLI 2.0 Tips and TricksAzure CLI 2.0 Tips and Tricks
Azure CLI 2.0 Tips and Tricks
 
Tests Driven PowerShell Learning
Tests Driven PowerShell LearningTests Driven PowerShell Learning
Tests Driven PowerShell Learning
 
PowerShell Data as File System
PowerShell Data as File SystemPowerShell Data as File System
PowerShell Data as File System
 
Azure at the command line
Azure at the command lineAzure at the command line
Azure at the command line
 
Microsoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOpsMicrosoft Azure Cloud and DevOps
Microsoft Azure Cloud and DevOps
 
Using PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormationUsing PowerShell DSC with AWS Cloud and CloudFormation
Using PowerShell DSC with AWS Cloud and CloudFormation
 
Developing Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CDDeveloping Infrastructure Code for CI & CD
Developing Infrastructure Code for CI & CD
 
PowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node SynchronizationPowerShell DSC Partial Configurations and Cross-node Synchronization
PowerShell DSC Partial Configurations and Cross-node Synchronization
 
Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016Operations Validation for Infrastructure As Code - PSConfEU 2016
Operations Validation for Infrastructure As Code - PSConfEU 2016
 
Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015Authoring Azure Resource Manager Templates - Future Unleashed 2015
Authoring Azure Resource Manager Templates - Future Unleashed 2015
 
Cloud Computing for IT professionals
Cloud Computing for IT professionalsCloud Computing for IT professionals
Cloud Computing for IT professionals
 
Introduction to Microsoft Azure Compute
Introduction to Microsoft Azure ComputeIntroduction to Microsoft Azure Compute
Introduction to Microsoft Azure Compute
 
Cross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State ConfigurationCross platform configuration management using Desired State Configuration
Cross platform configuration management using Desired State Configuration
 
Windows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V ReplicaWindows Server 2012 R2 Hyper-V Replica
Windows Server 2012 R2 Hyper-V Replica
 
Whats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-VWhats new in Windows Server 2012 R2 Hyper-V
Whats new in Windows Server 2012 R2 Hyper-V
 
Configuration management comes to Windows
Configuration management comes to WindowsConfiguration management comes to Windows
Configuration management comes to Windows
 
Desired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc indiaDesired state-configuration-ravikanth-august-2013-vtc india
Desired state-configuration-ravikanth-august-2013-vtc india
 
Power shell saturday ravikanth
Power shell saturday  ravikanthPower shell saturday  ravikanth
Power shell saturday ravikanth
 
PowerShell 3.0 workflows
PowerShell 3.0 workflowsPowerShell 3.0 workflows
PowerShell 3.0 workflows
 

Dernier

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 

Dernier (20)

The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 

Using PowerShell for active directory management

  • 1. PowerShell for Managing Active Directory Ravikanth C
  • 2. About me Lead Engineer at Dell Windows PowerShell MVP Developer on several PowerShell projects on Codeplex Author of Free eBook: Layman’s guide to PowerShell 2.0 remoting Co-author on Quest’s SharePoint 2010 & PowerShell cheat sheet Blog at http://www.ravichaganti.com/blog Founder & editor of PowerShellFromIndia More details on this soon 
  • 3. Giving away.. Two copies (eBook) of Managing Active Directory with Windows PowerShell: TFM Thanks to Sapien Press One copy (eBook) of Windows PowerShell Cookbook Thanks to O'Reilly Media
  • 4. PowerShell for Active Directory [ADSI] adapter In-box Windows Server 2008 R2 includes a PowerShell module In-box Quest Software ActiveRoles Management Shell Free download Softerra Adaxes 2010.2 Commercial product Idera Scripts for Active Directory Free; uses [ADSI]
  • 5. PowerShell for Active Directory Microsoft cmdlets Quest cmdlets PowerShell 2.0 only Require AD Management Gateway for managing pre-Windows 2008 R2 DC Cannot manage local LDS Cannot manage terminal services attributes Version Independent Support Windows 2003, 2008, and 2008 R2 DC management Can manage local LDS Can manage terminal services attributes
  • 6. Microsoft cmdlets for Active Directory In-box from Windows Server 2008 R2 onwards Get enabled by Installing AD DS or LDS server roles or Running DCPromo.exe or Installing RSAT on Windows Server 2008 R2 or Windows 7 To access AD cmdlets Start->Administrative Tools->Active Directory Module for Windows PowerShell or Import-Module ActiveDirectory To list AD cmdlets Get-Command -noun AD* or Get-Command –Module ActiveDirectory
  • 7.
  • 8. AD PowerShell cmdlets & ADAC use AD web servicesto administer directory
  • 9.
  • 10. Forest & Domains Get-ADForest Set-ADForest Set-ADForestMode Get-ADDomain Set-ADDomainMode
  • 11. User Accounts Get-ADUser New-ADUser Set-ADUser Remove-ADUser Disable-ADAccount Enable-ADAccount Set-ADAccountExpiration Clear-ADAccountExpiration Set-ADAccountPassword Unlock-ADAccount
  • 12. Groups Get-ADGroup New-ADGroup Set-ADGroup Remove-ADGroup Get-ADGroupMember Add-ADGroupMember Remove-ADGroupMember
  • 13. OU tasks Get-ADOrganizationalUnit New- ADOrganizationalUnit
  • 14. Service Accounts Get-ADServiceAccount New-ADServiceAccount Set-ADServiceAccount Install-ADServiceAccount Uninstall-ADServiceAccount Reset-ADServiceAccountPassword
  • 15. AD Recycle Bin Enable AD Optional Feature: “Recycle Bin Feature” This is an irreversible action Restore-ADObject to restore deleted objects
  • 16. Moving an AD Object Use Get-ADObject to get an instance Pipe it to Move-ADObject and specify new location as a value to -TargetPath
  • 17. Learning Resources – PowerShell for AD Cmdlet reference Book: Managing Active Directory with PowerShell: TFM AD cmdlets quick reference guide Adaxes Cmdlets Quest Cmdlets Idera PowerShell Scripts ADMGS for down level servers
  • 18. Learning resources - PowerShell Getting started guide PowerShell Learning center The scripting Guys blog PowerScripting Podcast PowerShell.com free online eBook
  • 19. Q & A Thanks

Notes de l'éditeur

  1. $users = [ADSI]"LDAP://cn=users,dc=barcamp,dc=in“[ADSI] can get quite verbose as we start doing advanced tasks
  2. Get-ADForest BarCamp.inGet-ADForest –Current LoggedOnUserGet-ADForest –Current LocalComputerSet-ADForest can be used to change Authentication Type, UPNSuffixes and SPNSuffixe (Default is negotiate. Basic requires SSL)Set-ADForestMode changes the forest functional mode.Set-ADForestMode -Identity BarCamp.in -ForestMode Windows2008R2ForestPossible values for this parameter are: Windows2000Forest or 0 Windows2003InterimForest or 1 Windows2003Forest or 2 Windows2008Forest or 3 Windows2008R2Forest or 4Get-ADDomain BarCamp.in(Get-AdDomain).DomainModeSet-AdDomainMode –DomainMode Windows2008R2DomainWindows2000Domain or 0Windows2003InterimDomain or 1Windows2003Domain or 2Windows2008Domain or 3Windows2008R2Domain or 4
  3. #To Get specific user detailsGet-ADUser –Identity “Ravikanth”#To filter by UserNameGet-ADUser –Filter ‘Name –like ‘Ravi*’”#To filter from a selected OUGet-ADUser -Filter * -SearchBase "CN=Users,DC=BarCamp,DC=in“#To see additional properties than the default setGet-ADUser –Filter ‘Name –like ‘Admin*’” –Properties Description#To see all propertiesGet-AdUser "Ravikanth" -Properties *New-ADUser-Name “Bill Gates" -SamAccountName“BillG" -GivenName“Bill" -Surname “Gates" -DisplayName“Bill Gates" -Path ‘CN=Users,DC=BarCamp,DC=in' -OtherAttributes@{'Title'=“God at Microsoft"} -AccountPassword (Read-Host -AsSecureString"AccountPassword") -Enabled $true#Change user propertiesSet-ADUser Ravikanth -City Bangalore -Replace @{title="PowerShell MVP";Description="Is a part of Domain Users"}Set-ADUser Ravikanth -Clear Description#Remove UserAccountRemove-ADUser "Rchaganti”#Disable AccountDisable-ADAccount -Identity Ravikanth#Enable AccountEnable-ADAccount -Identity Ravikanth#Set account Expiry dateSet-ADAccountExpiration -Identity Ravikanth -DateTime "12/31/2010"#Clear Account ExpiryClear-ADAccountExpiration -Identity Ravikanth#Set Account PasswordSet-ADAccountPassword -Identity Ravikanth ` -Reset -NewPassword (ConvertTo-SecureString -AsPlainText "Warri0r@" -Force)#Unlock AccountUnlock-ADAccount Ravikanth
  4. #Get AD GroupGet-ADGroupDomainUsersGet-ADGroup -Filter *#New AD GroupNew-ADGroup -Name "Bitpro" -SamAccountName "Bitpro" -GroupScope Global -Path "DC=BarCamp,DC=in“#Remove-ADGroupRemove-ADGroup -Identity BITPro -Confirm#Get AD Group memberGet-ADGroupMember -Identity Administrators#Add a user to groupAdd-ADGroupMember -Identity DemoUsers -Members Ravikanth#Remove group membersRemove-ADGroupMember -Identity DemoUsers -Members Ravikanth
  5. #OUGet-ADOrganizationalUnit -Filter *Get-ADOrganizationalUnit -Filter * -Properties *#Create OUNew-ADOrganizationalUnit -DisplayName "DemoOU" -Name "DEMOOU" -Path "DC=BarCamp,DC=in"
  6. #Get-ADServiceAccountGet-ADServiceAccount -Filter *#New AD Service AccountNew-ADServiceAccount -Name DemoService -DisplayName "Demo Service Account" ` -Path "OU=DEMOOU,DC=BarCamp,DC=in" ` -AccountPassword (ConvertTo-SecureString -AsPlainText "Warri0r@" -Force)#remove AD Service AccountRemove-ADServiceAccountDemoService#Install AD Service AccountInstall-ADServiceAccountDemoService#UnInstall AD Service AccountUnInstall-ADServiceAccountDemoService#Reset AD Service AccountPasswordReset-ADServiceAccountPassword -Identity DemoService
  7. #Enable Recycle BinEnable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target 'BarCamp.in'#Restore AD Object from recycle binGet-ADObject -Filter 'samaccountname -eq "rchaganti"' -IncludeDeletedObjectsGet-ADObject -Filter 'samaccountname -eq "rchaganti"' -IncludeDeletedObjects | Restore-ADObject
  8. $user=Get-ADObject -Filter "SamAccountName -eq 'RChaganti'"$user | Move-ADObject -TargetPath "CN=Users,DC=BarCamp,DC=in"