Monday, July 20, 2009

With (native) Windows NT 4+ commands: NET LOCALGROUP Administrators Or, to remove header and footer lines: FOR /F "delims=[]" %%A IN ('NET LOCALGROUP Administrators ˆ| FIND /N "----"') DO SET HeaderLines=%%A FOR /F "tokens=*" %%A IN ('NET LOCALGROUP Administrators') DO SET FooterLine=%%A NET LOCALGROUP Administrators | MORE /E +%HeaderLines% | FIND /V "%FooterLine%"...

"I need an up-to-date list of disk space usage for all servers, on my desk in 5 minutes"

Sounds familiar? With (native) Windows XP Professional or Windows Server 2003 commands: FOR /F %%A IN (servers.txt) DO ( WMIC /Node:%%A LogicalDisk Where DriveType="3" Get DeviceID,FileSystem,FreeSpace,Size /Format:csv | MORE /E +2 >> SRVSPACE.CSV ) The only prerequisites are: SRVSPACE.CSV should not exist or be empty, a list of server names in a file...

Delete a computer account

With native Windows 2000 commands: NETDOM /DOMAIN:MyDomain MEMBER \\computer2Bdeleted /DELETE NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM....

List all workstations

With native Windows 2000 commands: NETDOM QUERY /D:MyDomain WORKSTATION NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM....

Find the primary domain controller

With native Windows 2000 commands: NETDOM QUERY /D:MyDomain PDC or, to find the FSMO with (native) Windows Server 2003 commands (Active Directory only): NETDOM QUERY /D:mydomain.com FSMO NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM....

List all domain controllers

With native Windows 2000 commands: NETDOM QUERY /D:MyDomain DC NETDOM is part of the support tools found in the \SUPPORT directory of the Windows 2000 installation CDROM. With (native) Windows Server 2003 commands (Active Directory only): DSQUERY Server or, if you prefer host names only (tip by Jim Christian Flatin): DSQUERY Server -o ...

How do I reset someone's password?

With the native NET command: NET USER loginname newpassword /DOMAIN With (native) Windows Server 2003 commands: DSQUERY USER -samid loginname | DSMOD USER -pwd newpassword Note: To prevent the new password from being displayed on screen replace it with an asterisk (*); you will then be prompted (twice) to type the new password "blindl...

What groups is this user a member of?

In Windows NT 4 and later, users usually are members of global groups. These global groups in turn are members of (domain) local groups. Access permissions are given to (domain) local groups.To check if a user has access to a resource, we need to check group membership recursively.With (native) Windows Server 2003 commands: DSQUERY USER -samid loginname | DSGET USER -memberof...

What is the full name for this login name?

With the native NET command: NET USER loginname /DOMAIN | FIND /I " name " With (native) Windows Server 2003 commands: DSQUERY USER -samid *loginname* | DSGET USER -samid -display Note: The NET command may seem more universal, because it requires neither Active Directory nor Windows Server 2003 commands, but it is language dependent! ...

What is this collegue's login name?

My collegues often forget to mention their logon account name when calling the helpdesk, and the helpdesk doesn't always ask either. I suppose they expect me to know all 1500+ accounts by heart.With (native) Windows Server 2003 commands only: DSQUERY USER -name *lastname* | DSGET USER -samid -display Note: Windows Server 2003's "DSTools" will work...

Who is logged on to a computer?

We often need to know who is currently logged on to a remote computer.With native Windows commands only: NBTSTAT -a remotecomputer | FIND "<03>" | FIND /I /V "remotecomputer" The first name in the list usually is the logged on user (try playing with the NET NAME command to learn more about the names displayed by NBTSTAT).This is the fastest way to find the logged on...

How many users are logged on/connected to a server?

Sometimes we may need to know how many users are logged on to a (file) server, like maybe when there is a performance degradation.At the server's console itself, with native commands only: NET SESSION | FIND /C "\\" Remotely, with the help of SysInternals' PSTools: PSEXEC \\servername NET SESSION | FIND /C "\\" By replacing FIND /C "\\" by FIND "\\" (removing the /C...

Domain implementation and Group policies brief overview

Download Word Documents Manageover.doc ClusteringOverview Adam.DOCIntmob.doc highavaildfsAD_SecurityADtechoverClusterQuorums BITSMMS_2003_OverviewMIISPassMgmtMngfrmwkMigUNIXPrintClusterMigwin32SANRMSTechOverviewScaleMIISSecplatStepbystep_IPv6finalWindowsSystemResourceManagerAccountingServerClustersArchitectureUDDIGuideUpgwin2kUDDISynopSecInnovationSUS_Deployguide_sp1UDDIScenWindowsSystemResourceManagerAccountingWMS_TechOverviewUDDISynopUpgwin2kConnecting_Remote_SitesconnectnetworkADLDAPComplianceWLANCertEnrollconnect...

Thursday, July 9, 2009

Backing Up Domain Controllers

It is important to back up your domain controllers to ensure their availability. Backing up a domain controller is like backing up a Microsoft® Exchange member server. The primary difference between backing up a domain controller and backing up an Exchange member server is that you...