27 March 2013

Enable fully qualified domain names in DFS


1.     If the DFS server hosts a DFS root or replica, remove it from the server. (If you accidentally activated the DfsDnsConfig parameter without removing configuration information, you can clear it by typing dfsutil /clean: computername.


2.     Start Registry Editor and open the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dfs

3.     If you find a DfsDnsConfig value, click Edit Value on the Edit menu, and then change the value to 1. If there is no DfsDnsConfig value, click Add Value on the Edit menu, and then add the following information value:
Value Name: DfsDnsConfig
Data Type: REG_DWORD
Value Data: 0 or 1


If you set the data value to 1, all roots added to the DFS tree use a fully qualified domain name. 0 specifies the default behavior.Note This registry Key takes effect only after the DFS Service is restarted.

04 March 2013

LAN Manager - Windows 7

In windows 7 you may encounter problems in accessing network resources because of default "LAN Manager authentication level" group policy setting.

To modify this setting navigate to:
Local Computer Policy - Computer Configuration - Windows Settings - Security Settings - Local Policies - Security Options - LAN Manager authentication level



08 January 2013

Retrieve computer manufacturer and model

WMI class Win32_ComputerSystem has information about computer hardware manufacturer and computer model:

Get-WmiObject -Class Win32_ComputerSystem


Manufacturer     : Dell Inc.
Model               : OptiPlex 740 Enhanced

Get-WmiObject can also be used to retrieve this information from remote computers:

Get-WmiObject -Class Win32_ComputerSystem -ComputerName computer_name

03 January 2013

LDAP syntax

LDAPFilter parameter of the Get-ADuser cmdlet is much easy to use an type;

One LDAPFilter conditions is enclosed in parenthesis and an operator will precede two conditions:

Eg. ( & (condition one) (condition two) ) - translate as condition one AND condition two

( | (condition one) (condition two) ) - translate as condition one OR condition two

 Logical conditions are formed using Active Directory attributes names like objectClass, objectCategory, name.

Eg.: to search for all users whose name start with "z" we will use:
(&(objectcategory=person)(name=z*))


 Get-ADUser -LDAPFilter {(&(objectCategory=person)(name=z*))}

It is recomended to use objectCategory instead of objectClass when ever possible because objectClass attribute can have multiple values and objectCategory is an indexed attribute in Active Directory and will speed up the search.


02 January 2013

Powershell 3 help files

Powershell 3 ( or Windows Management Framework 3 ) does not contain help files so if you need local help about cmdlets you will need to update your help files;

Update-Help is the cmdlet that will update your help files; you need to run your powershell with elevated rights (Run As Administrator).

Keep in mind that your user interface language setting will be used when help files are updated and the content of the files will be in your locale language;

You can also use the "-UICulture" parameter to specify for what language to download or update help files;