Windows server and Windows XP – How to troubleshoot Group Policy from the command line using GPRESULT

Posted by aidas | Posted in Group policy, Windows 2003, Windows 2008, Windows XP | Posted on 26-07-2010

0

If you are trying to determine why Your new GPO policy is not being applied as expected, one of first things you should do is examine the Resultant Set of Policy (RSoP) for the user and computer experiencing problems with policy settings on Your Windows Server 2008.

Using the Gpresult command-line utility, you can view RSoP.

Gpresult command provides details on the following:

  • special settings applied for folder redirection, software installation, disk quota, IPSec, and scripts;
  • last time Group Policy was applied;
  • domain controller from which policy was applied and the security group memberships for the computer and user accounts;
  • complete list of GPO that were applied and complete list of GPO that were not applied because of filters.

Gpresult has the following syntax:
gpresult /s [ComputerName] /user [Domain\UserName]

[ComputerName] – is the name of the computer that you want to log policy results for

[Domain\UserName] – domain user that you want to log policy results for

Lets for example view the RSoP for server named “TestServer1” and the user “testuser1” in the “test.lan” domain. In this case open command line on Your Windows server and type:
gpresult /s TestServer1 /user test.lan\testuser1

Also You can view more detailed output by using one of the two verbose options.

/v parameter turns on verbose output and results are displayed only for policy settings in effect

/z parameter turns on verbose output with settings for policy settings in effect and all other GPOs that have the policy set

In additionYou can create an HTML report using the /h parameter or an XML report using the /x parameter.

Have fun !

Windows server 2008 Core – How to set static IP address via command line

Posted by Mark | Posted in Command line, Networking, Windows 2008 | Posted on 30-07-2009

0

This topic will show how to set static IP 192.168.0.10 with mask 255.255.255.0 to your Windows server 2008 Core interface named “Local Area Connection” .

Also we will set DNS server IP 192.168.0.11.

To set static IP address and mask type:

netsh interface ipv4 set address name=”Local Area Connection” source=static address=192.168.0.10 mask 255.255.255.0

To set DNS server IP type:

netsh interface ipv4 add dnsserver name=”Local Area Connection” address=192.168.0.11

Windows server 2008 Core – How to activate server

Posted by Mark | Posted in Command line, Scripting, Windows 2008 | Posted on 28-07-2009

0

This post will show you way how to activate Windows server 2008 Core.

You can do that with script named slmgr.vbs.

To perform activation type this in command line:

slmgr.vbs -ato

win2008_act

Press Enter and you are done!

Windows server 2008 – How to find Terminal servers in your domain

Posted by Mark | Posted in Command line, Terminal services, Windows 2008 | Posted on 24-06-2009

0

This post will show you how to find Windows server 2008 with Terminal server role installed in your domain.

To perform search in domain named “Testdomain.com” domain open command line and type:

query termserver /domain:Testdomain.com

win2008_terminals

Press “Enter” and you are done !


Windows server 2003/2008 and Exchange 2007 – How to modify database size limit

Posted by Thomas | Posted in Exchange 2007, Powershell, Registry, Windows 2003, Windows 2008 | Posted on 23-06-2009

0

By default Exchange server 2007 Stardart database size limit is 50Gb.

Exchange server 2007 Enterprise edition has no limit for database size.

In this post we will see how to change size for the mailbox database named “FirstDB”.

We will work with Exchange 2007 Standart “TestExchange” running on Windows server 2003.

First we need to retrieve GUID ID for “FirstDB” database, which can be found in FirstSG storage group.

To do it open exchange powershell and type:

Get-MailboxDatabase -Identity “TestExchange\FirstSG\FirstDB” | Format-Table Name, GUID

When you have GUID for your database open registry editor and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\TestExchange\Private-<database GUID>

If you can see DWORD value Database size limit in GB open it ant type your new limit for database in GB.

If value cannot be located, create new DWORD value with “Database size limit in GB” name and set value in GB.

Windows server 2008 and Windows Vista – How to change your license key via command line

Posted by aidas | Posted in Command line, Windows 2008, Windows Vista | Posted on 22-06-2009

0

This post will show you quick way to change license key on your Windows server 2008 or Windows Vista using command line.

Lets say we want to change our license key to AAAAA-BBBBB-CCCCC-DDDDD-EEEEE (Note that this is not legal license key !!!) .

To change key open command line (Start>Run>cmd) and type:

slmgr -ipk AAAAA-BBBBB-CCCCC-DDDDD-EEEEE

key_change

Press “Enter” and You are done !

Windows server 2008 – How to create computer account in Active Directory via command line

Posted by Thomas | Posted in Active directory, Command line, Windows 2008 | Posted on 18-06-2009

0

This post will show you how to create new computer account in active directory using command line.

Lets say, in our scenario,  we want to create  new computer account named “TestPC1″ in default Computers container. Also note that our domain is named “testdomain.com” in this case.

To do it open command line on your Windows server 2008 and type:

dsadd computer cn=TestPC1,cn=Computers,dc=testdomain,dc=com

Windows server 2003/2008 – How to check Exchange 2007 health via powershell

Posted by Mark | Posted in Exchange 2007, Powershell, Windows 2003, Windows 2008 | Posted on 16-06-2009

0

This post will show you how to check basic Exchange server 2007 health using powershell commands.

To check if all required services are running open exchange powershell on you Windows server 2003/2008 and type:

Test-servicehealth

To perform MAPI connectivity check type:

Test-MAPIConnectivity

Windows server 2008 – How to list IIS websites on Windows 2008

Posted by aidas | Posted in Command line, Windows 2008 | Posted on 20-05-2009

0

This post will show you how to list IIS 7.0 websites on your Windows server 2008 using command line tool appcmd .

Appcmd tool is used to query, create and configure IIS 7.0 server properties, web sites and application pools.

To list all web sites on IIS 7.0 open command line and type:

appcmd list sites

Done!

Windows server 2008 – How to open secure command line on remote server

Posted by aidas | Posted in Command line, Windows 2008 | Posted on 19-05-2009

0

This post will show you how to open secure command line on remote Windows server 2008. All communications between client and remote host will be encrypted by Kerberos or NTLM keys. Lets say we want to connect to server named “testserver”. To do it open command line on your Windows server 2008 and type:

winrs -r:testserver cmd

Windows server 2008 – How to perform full system backup via command line

Posted by aidas | Posted in Command line, Windows 2008 | Posted on 19-05-2009

0

This post will show you how to create full system backup of your Windows server 2008 using command line. Lets say we want to create full system backup and place it to network share \\Backupserver\Data . Open command line and type:

wbadmin start backup -backuptarget \\Backupserver\Data -allCritical -vssFull

Windows server 2003/2008 and Windows XP/Vista – How to enable remote desktop via registry

Posted by aidas | Posted in Registry, Windows 2003, Windows 2008, Windows Vista, Windows XP | Posted on 14-05-2009

0

This quick post will show you how to enable remote desktop service by editing registry settings on your Windows server. To enable RD open registry editor and navigate to:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server

Double click on “fDenyTSConnections” and change Value data to 0 .