Script: Powershell script for changing the AD Home Dir and Drive


image 

Stel je bent midden in een migratie naar een andere fileserver of naar bijvoorbeeld een NetApp filer. Daarnaast wil je ook alle Home directory’s migreren. Dit houdt in dat je ook de Active Directory moet aanpassen.  Dit kun je op verschillende manieren doen. Ik heb gekozen om eens te kijken naar de Quest ActiveRoles addin voor Powershell en dat bleek behoorlijk krachtig te zij, zoals je kunt zien in het onderstaande scriptje:

image

Voordat je dit script kunt gebruiken heb je een PC nodig die lid is van het domain, PowerShell en de Quest AD cmd-lets geïnstalleerd heeft. Daarna kun je het script als volgt uitvoeren:

PS Scriptdir> .\Change_Home_Dir_drive.ps1

image

Daarna kun je in de Active Directory nakijken of het script succesvol heeft gelopen.

image

EventID: 213 LicenseService


Het kan zijn dat je de volgende error krijgt in de eventvwr.msc.

image

Na wat googlen kwam ik het volgende KB artikel tegen: KB296681 In dit artikel wordt stap voor stap uitgelegd hoe je dit kunt herstellen.

Stap 1: open Active Directory Sites and Services en selecteer vervolgens de site waar de server zich bevind. Klik daarna op Licensing Site Settings.

image

In dit geval was de Computer en het Domain invalid. Deze heb ik aangepast en na de eerst volgende replicatie mag de foutmelding niet meer voor mogen komen.

image

How To: Ubuntu in a Windows Domain


In deze “How To” lees je hoe eenvoudig het is geworden om een Ubuntu 8.04 machine in een Windows domain toe te voegen.

Als eerste dien je likewise-open te installeren en te configureren. Dit gaat als volgt:

  • sudo apt-get update
  • sudo apt-get install likewise-open
  • sudo domainjoin-cli join ubuntu.lnx.lab Administrator
    fqdn                             Administrator account binnen AD.image
  • sudo update-rc.d likewise-open defaults
    image
  • sudo /etc/init.d/likewise-open start
  • sudo reboot -n

Nadat de linux machine opnieuw is opgestart kun je inloggen met Domain\Userid

image

Je kunt in de Terminal nog even via het commando whoami nakijken of alles klopt:

image

Als je nu op de Domain Controller in de Active Directory kijkt, zie je de linux doos in de Computers container staan:

image

Bron: http://bobbyallen.wordpress.com/2008/05/23/how-to-join-ubuntu-804-to-windows-active-directory-domain/

Microsoft: Active Directory Design Considerations


image

Mark Wilson heeft een serie artikelen gemaakt over het ontwerpen van een Active Directory.

Bron: http://www.markwilson.co.uk/blog/

LDAP Query


In mijn omgeving werken we nu nog met twee verschillende loginscripts. Ik wilde graag weten welke gebruikers die nog enabled waren het oude loginscript aangekoppeld hadden. Dit kun je doen door de volgende LDAP query uit te voeren in Active Directory Users and Computers.

 

De onderstaande query geeft alle users weer met het loginscript login.bat en de accountstatus op enabled

(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2)(scriptPath=login.bat))

 

De volgende LDAP query doet bijna hetzelfde als de bovenstaande alleen geeft deze de personen terug met de accountstatus op disabled

(objectCategory=Person)(objectClass=User)(userAccountControl:1.2.840.113556.1.4.803:=2)(scriptPath=login.bat)

 

Een LDAP query ziet er dan als volgt uit:

image

Geholpen door het volgende KB artikel: KB827754

Microsoft: Health Checks on Domain Controllers


Brian W. McCann heeft een korte post gemaakt over Health Checks on Domain Controllers.

Hieronder zie je de tools die hij beschrijft:

Dcdiag.exe /v >> c:\temp\pre_dcdiag.txt
This is a must and will always tell you if there is trouble with your DCs and/or services associated with it.

Netdiag.exe /v >> c:\temp\pre_Netdiag.txt
This will let me know if there are issues with the networking components on the DC. This along with the post test also is a quick easy way to ensure the patch I just installed is really installed (just check the top of the log)

Netsh dhcp show server >> c:\temp\pre_dhcp.txt
Some may not do this but I’ve felt the pain of a DHCP server somehow not being authorized after a patch. This allows me verify the server count and names.

Repadmin /showreps >> c:\temp\pre_rep_partners.txt
This shows all my replication and if it was successful or not. Just be aware that Global Catalogs will have more info here than a normal domain controller.

repadmin /replsum /errorsonly >> c:\temp\pre_repadmin_err.txt
This is the one that always takes forever but will let you know who you are having issues replicating with.

Bron: http://www.adminprep.com/articles/default.asp?action=show&articleid=101

Microsoft: Infrastructure Planning and Design


 

 
Overview

Infrastructure Planning and Design guides share a common structure, including:

  • Definition of the technical decision flow through the planning process.
  • Listing of decisions to be made and the commonly available options and considerations.
  • Relating the decisions and options to the business in terms of cost, complexity, and other characteristics.
  • Framing decisions in terms of additional questions to the business to ensure a comprehensive alignment with the appropriate business landscape.

These guides complement product documentation by focusing on infrastructure design options.
Each guide leads the reader through critical infrastructure design decisions, in the appropriate order, evaluating the available options for each decision against its impact on critical characteristics of the infrastructure. The IPD Series highlights when service and infrastructure goals should be validated with the organization and provides additional questions that should be asked of service stakeholders and decision makers.
IPD consists of the following downloadable packages:

  • Infrastructure Planning and Design Series Introduction
  • Selecting the Right Virtualization Technology
  • Microsoft SoftGrid Application Virtualization
  • Windows Server Virtualization (for Windows Server 2008 Hyper-V and Virtual Server 2005 R2 SP1)
  • New! Windows Deployment Services
  • New! Windows Server 2008 Active Directory Domain Services
  • New! Windows Server 2008 Terminal Services

The guides are available as individual downloads or as a single all-in-one package.
Send questions or feedback to us directly at SATfdbk@microsoft.com

 
System Requirements
  • Supported Operating Systems: Windows Server 2003; Windows Vista; Windows XP
  • These download files work with the following Office programs:
    • Microsoft Office Word 2007 (.docx)
    • Microsoft Office Word 2003 (.doc)
    • A Word viewer such as Word Viewer 2003.

Instructions

  1. To start the download, select a file from the list of Files in this Download on this page.
  2. Save the .zip file to your preferred location on your computer.

 
Additional Information

Solution Accelerators are free, scenario-based guides and automations designed to help IT professionals who are proactively planning, deploying, and operating IT systems using Microsoft products and technologies. Solution Accelerator scenarios focus on security and compliance, management and infrastructure, and communication and collaboration.
More Information about the Solution Accelerator Notifications Newsletter
Register to receive the Solution Accelerator Notifications newsletter so that you can stay informed about new Solution Accelerator releases and updates. The newsletter covers such areas of interest as:

  • Communication and Collaboration
  • Security, Data Protection, and Recovery
  • Deployment
  • Operations and Management

You may also receive invitations to participate in accelerator development via beta programs and customer surveys. Solution Accelerator Notifications is currently available in English only.

 

You can download the documents over here: http://www.microsoft.com/downloads/

VBScript: Create a Domain Local Security Group


Voor een nieuwe folderstructuur op ons netwerk, moest ik een groot aantal nieuwe Domain Local Security Groups aanmaken. Dit doe je natuurlijk niet met de hand maar  via een script. Ik wist toevallig dat Bouke Groenescheij van www.jume.nl hier al een script voor had gemaak. Het script kun je hier vinden: http://www.jume.nl/index.php?option=com_content&task=view&id=73&Itemid=1

Zijn script heb ik een klein beetje aangepast zodat het Domain Local Security Groups aanmaakt i.p.v Global Security Groups.

Ik heb de volgende regels eruit gehaald:

Const ADS_GROUP_TYPE_DOMAIN_LOCAL_GROUP = 4
Const ADS_GROUP_TYPE_GLOBAL_GROUP       = 2
Const ADS_GROUP_TYPE_LOCAL_GROUP        = 4
Const ADS_GROUP_TYPE_SECURITY_ENABLED   = -2147483648
Const ADS_GROUP_TYPE_UNIVERSAL_GROUP    = 8

en vervangen voor:

Const ADS_GROUP_TYPE_GLOBAL_GROUP = &h4
Const ADS_GROUP_TYPE_SECURITY_ENABLED = &h80000000

Meer informatie over de Const ADS_GROUP_TYPE vindt je in dit document: 63_65_scripting_guy.pdf

Daarna moet je nog een regel aanpassen in het script:

‘ ################################################################
‘ CreateGroups.vbs – Create a lot of groups based on a text file
‘ Written by Bouke Groenescheij – Jume B.V.: http://www.jume.nl
‘ Version 1.0
‘ ################################################################

‘ You will need to supply this info:
strGroupParentDN = “ou=Bulkimport,dc=ctx45,dc=lab”

In het dik gedrukte gedeelte vul je de ou naam in en je domain. bijvoorbeel ctx45.lab

Nadat je dit gedaan hebt, moet je nog een textfile aanmaken. In deze tekstfile plaats je de naam van de groep en de description. Dit ziet er als volgt uit:

ctx_test1,testgroep1
ctx_test2,testgroep2
ctx_test3,testgroep3
ctx_test4,testgroep4
ctx_test5,testgroep5
ctx_test6,testgroep6
ctx_test7,testgroep7
ctx_test8,testgroep8
ctx_test9,testgroep9

Als laatste voer je het script als volgt uit:

cscript CreateGroups.vbs groups.txt

binnen enkele seconden zijn alle groepen aangemaakt.

Bouke bedankt voor het delen van dit handige script!

Windows: Offline Defragmentation of The Active Directory database


Ik was vandaag genoodzaakt om een offline defragmentatie uit te voeren op een domain controller. Dit heb ik gedaan door het volgen KB232122.

In deze post laat ik jullie via screenshots zien hoe dit in zijn werk gaat.

Let Op! Doe deze tutorial alleen als je door een KB van Microsoft word gevraagd om dit te doen.

Continue reading “Windows: Offline Defragmentation of The Active Directory database”