Archive for the 'Windows Server' Category

How to get the default Domain Controller and Domain GPO back

dcgpofix /target:both

No Comments »

admin on July 10th 2013 in Windows, Windows Server

DHCP Server with DHCP Relay Agent in Windows 2012 Server

If you have two different networks and you don’t want to install a DHCP Server on each side you can use “DHCP Relay Agent” Service.


Here a quick tutorial:
1. DHCP-Server
    Install “DHCP-Server” Role

2. Configure DHCP Scopes
    Scope A
    Scope B

3. Router
    Should have two Network cards. For each network one.
    Network A IP:
    Network B IP:

4. Install “Remote Access” Role

5. Run “Routing and Remote Access”

6. “Configure and Enable Routing and Remote Access”

7. Choose “Custom Configuration”

8. Choose “LAN routing” and start the service

9. Install the DHCP Relay Agent
    Right Click on General in IPv4 and choose “New Routing Protocol” and there you can finally choose “DHCP Relay Agent”.

10. Right Click on” DHCP Relay Agent” and choose “Properties”. There you add your DHCP Server. In this case it would be

11. Add the Network B Interface to the “DHCP Relay Agent”.

12. You should be done. In Windows 2008 it’s possible that you need to make adjustments to your Windows Firewall.

13. You can test on your client to get an IP Adress. Run from the command console: Ipconfig /release and Ipconfig /renew. 
     After that you should be able to see the IP address if you type: ipconfig.

No Comments »

admin on July 3rd 2013 in Windows Server

Migrate Printers from Windows 2008 to 2012 with Powershell

It is possible to export all printers from Windows 2008 Server and import them again into Windows 2012. I tried this method but got just error messages and I didn’t like the fact, that it imports also the old drivers. So I installed first the necessary printer drivers on the new server and run the script below to create all the printers. It automatically adds the necessary ports and the printers. If you want to add more parameters it is easily possible.

Create CSV file with the printers (printers.csv):
Name, IP, Driver, Location
"PRINTER01", "", "Xerox Global Print Driver PCL6", "Main Building, First Floor"
"PRINTER02", "", "Xerox Global Print Driver PCL6", "Main Building, Second Floor"

Script to import the printers (printers.ps1):
$printers = Import-Csv c:\temp\powershell\printers.csv
foreach ($printer in $printers) {
    Add-PrinterPort -Name $printer.Name -PrinterHostAddress $printer.IP
    Add-Printer -Name $printer.Name -DriverName $printer.Driver -PortName $printer.Name -Comment $printer.Comment -ShareName $printer.Name
    Set-printer -Name $printer.Name -Shared $true -Published $true

No Comments »

admin on June 6th 2013 in IT, Windows Server

Install SNMP with Powershell on Windows 2012

If you run the command without the management tools then you won’t have the tabs to configure the snmp-service. By the way the argument –Whatif shows you in advance what would be installed if you run the command. So to actually installe it run the command without –WhatIf.

#Add-WindowsFeature -Name SNMP-Service -IncludeAllSubFeature -IncludeManagementTools –Restart –WhatIf

No Comments »

admin on June 4th 2013 in IT, PowerShell, Windows Server

Enable Settings to be able to manage a Windows Server 2012 Core

Enable-PSRemoting –Force

Test-WSMan –ComputerName [Computer]
Enter-PSSession –ComputerName [Computer]

Manage via Server Manager
Configure-SMRemoting.exe –Enable

Enable-NetFirewallRule –DisplayGroup “Windows Remote Management”

Remote Desktop
cscript C:\Windows\System32\Scregedit.wsf /ar 0

or just conifgure it via sconfig

Run from another machine mstsc and connect to the server.

No Comments »

admin on May 2nd 2013 in Windows Server

See who is logged into a computer remotly and how to log off from a remote computer

With this query you get a list of all logged on users:
quser /SERVER:servername

Pick the ID from above to log off the user:
logoff 2 /SERVER:servername

No Comments »

admin on April 22nd 2013 in IT, Windows, Windows Server

Install Active Directory from a media to save initial replication time

If you need to setup Active Directory on another location and you don’t much bandwith you can install it from a media.

On the source AD create the files to copy to the media:
#activate instance ntds

#create rodc c:\temp
For a Read Only Domain Controller

#create full c:\temp
For a Standard Domain Controller

Check the files and copy it to a media. On the new DC you can choose the files for the first replication

No Comments »

admin on March 6th 2013 in IT, Windows Server

How to upgrade from Windows 2012 Standard to Data Center

Run following command with your Data Center Key:
DISM /Online /Set-Edition:ServerDatacenter /AcceptEula /ProductKey: YOUR_PRODUCT_KEY

No Comments »

admin on March 6th 2013 in IT, Windows Server

How to access/edit Active Directory Schema

regsvr32 schmmgmt.dll
Add Snapin Schema

No Comments »

admin on March 5th 2013 in IT, Windows Server

Find out Domain Controller Informations

netdom query FSMO

dsquery server -hasfsmo pdc

RID Master
dsquery server -hasfsmo rid

Infrastructure Master
dsquery server -hasfsmo infr

Schema Master
dsquery server -hasfsmo schema

Domain Naming Master
dsquery server -hasfsmo name

No Comments »

admin on March 5th 2013 in IT, Windows Server

Check out new movies online website. Download and buy movies now.