Show 5 fsmo roles script

Set objRootDSE = GetObject(“LDAP://rootDSE“)

‘ Schema Master
Set objSchema = GetObject(“LDAP://” &_
objRootDSE.Get(“schemaNamingContext”))
strSchemaMaster = objSchema.Get(“fSMORoleOwner”)
Set objNtds = GetObject(“LDAP://” & strSchemaMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo “Forest-wide Schema Master FSMO: ” &_
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

‘ Domain Naming Master
Set objPartitions = GetObject(“LDAP://CN=Partitions,” & _
objRootDSE.Get(“configurationNamingContext”))
strDomainNamingMaster = objPartitions.Get(“fSMORoleOwner”)
Set objNtds = GetObject(“LDAP://” & strDomainNamingMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo “Forest-wide Domain Naming Master FSMO: ” &_
objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

‘ PDC Emulator
Set objDomain = GetObject(“LDAP://” &_
objRootDSE.Get(“defaultNamingContext”))
strPdcEmulator = objDomain.Get(“fSMORoleOwner”)
Set objNtds = GetObject(“LDAP://” & strPdcEmulator)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo “Domain’s PDC Emulator FSMO: ” & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

‘ RID Master
Set objRidManager = GetObject(“LDAP://CN=RID Manager$,CN=System,” & _
objRootDSE.Get(“defaultNamingContext”))
strRidMaster = objRidManager.Get(“fSMORoleOwner”)
Set objNtds = GetObject(“LDAP://” & strRidMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo “Domain’s RID Master FSMO: ” & objComputer.Name

Set objNtds = Nothing
Set objComputer = Nothing

‘ Infrastructure Master
Set objInfrastructure = GetObject(“LDAP://CN=Infrastructure,” & _
objRootDSE.Get(“defaultNamingContext”))
strInfrastructureMaster = objInfrastructure.Get(“fSMORoleOwner”)
Set objNtds = GetObject(“LDAP://” & strInfrastructureMaster)
Set objComputer = GetObject(objNtds.Parent)
WScript.Echo “Domain’s Infrastructure Master FSMO: ” & objComputer.Name

Source: http://www.thevortex.nl/index.php?option=com_content&task=view&id=48&Itemid=29

Manually Remove Trend Micro Officescan Client

  1. Go to Control Panel Services (services.msc), and stop the following services:
    • OfficeScanNT Listener
    • OfficeScanNT RealTimeScan
    • OfficeScanNT Personal Firewall (if enabled)
  2. Run Registry Editor (regedit.exe).
  3. Navigate to the following registry key

hive:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services

  1. Delete the following keys (if available):
    • Ntrtscan
    • Tmlisten
    • TmFilter
    • VSApiNt
    • TMPreFilter
    • TM_CFW
    • OfcPfwSvc
  2. Navigate to the following registry hive:

HKEY_LOCAL_MACHINE \SOFTWARE\TrendMicro

or

HKEY_LOCAL_MACHINE \SOFTWARE \Wow6432Node\TrendMicro (in 64-bit Windows operating system)

  1. Delete the following keys (if available):
    • OfcWatchDog
    • Pc-cillinNTCorp or OfficeScanCorp (depending on the client)
    • RemoteAgent
    • PC-cillin
    • CFW
  2. Browse to the following registry key hive:

HKEY_LOCAL_MACHINE \SOFTWARE \Microsoft\Windows\CurrentVersion\Run

  1. Delete the OfficeScanNT Monitor key.
  2. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall

  1. Delete the OfficeScanNT key.
  2. Delete the OfficeScan program group (Trend Micro OfficeScan Client) from the Windows Start menu.
  3. Restart the computer.
  4. Delete the directories that contain the OfficeScan Client program files, normally located inside Program Files folder.

Above steps work for OfficeScan 7.x client in Windows 2003/XP/2000/NT/Vista/2008 machine. For Trend Micro OfficeScan Corporate Edition (OSCE) – 5.58, OfficeScan Corporate Edition (OSCE) – 6.5, Client / Server / Messaging Suite for SMB – 2.0, follow these manual uninstallation steps instead.

  1. Delete the Trend Micro OfficeScan Client program shortcut in Start Menu, by right click on it and then choose Delete.
  2. Delete the installed files located in the OfficeScan folder under the \Program Files\Trend Micro\OfficeScan Client directory.
  3. Open the Registry Editor (regedit).
  4. Navigate to the following registry key:

HKEY_LOCAL_MACHINE\Software\TrendMicro

  1. Delete the following keys:
    • OfcWatchDog
    • PC-cillin
    • PC-cillinNTCorp
  2. Also delete the following registry hives:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run\OfficeScanNT Monitor
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\OfficeScanNT
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ntrtscan
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tmfilter
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\tmlisten
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TmPreFilter (for Win2003)
    • HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\VSApiNt
  3. Right click on My Computer

, click Manage and then select Device Manager.

  1. Enable the Show Hidden Devices option.
  2. Remove the following hidden devices in Non-Plug and Play Drivers tree pertaining to OfficeScan (right-click and select Uninstall):
    • Trend Micro VSAPI NT
    • Trend Micro FILTER
    • Common Firewall Driver
    • NTRTSCAN (if available)
    • TMLISTEN (if available)
  3. Restart the OfficeScan client machine.

Source: http://www.mydigitallife.info/2008/07/18/how-to-manually-uninstall-trend-micro-officescan-corporate-edition-client/

Install XP from USB (easy setup)

What you need

PeToUSB
– Copy of Windows XP
– 1GB USB flash

1: Put your Windows disc in your drive.
2: Insert your USB flash.
3: Load PeToUSB
4: Configure it with your sources and destination like this

5: Click start
6: Once it’s finished remove the USB flash and insert it into your EEE PC. Set the BIOS to boot from the USB flash.
7:
Watch it install!

Ps. @ Windows7 you must manually format the stick to FAT32 and run the software as aministrator

Source: http://netbooks.modaco.com/content/msi/261632/installing-xp-via-a-usb-stick/

Terminal server memory solutions

Many terminalservers have an memory problem. You easily can write a fix for it with a simple but powerful Windows 2003 server resource kit tool.

  • Then copy empty.exe from the resource kit to c:\scripts\freemem or something
  • Write a batch file c:\scripts\freemem\freemem.bat

Example batch file:

@echo off

c:\scripts\freemem\empty.exe iexplore.exe
c:\scripts\freemem\empty.exe outlook.exe
c:\scripts\freemem\empty.exe winword.exe

Run this script every 30 minutes en you have al lot of extra memory to spent 🙂

Also add the /PAE to your boot.ini to get 700mb extra (if you have 4 gig of ram). See this support article

Good luck!

Royal TS: Easy Remote Desktop Connections

Royal TS: Easy Remote Desktop Connections

Royal TS allows you to organize and manage multiple remote desktop connections. Connect to any machine where terminal services are enabled. Organize connections in custom categories for quick access. Connect directly to the console session and find out who else is connected to the machine.

Website:  http://code4ward.net/CS2/Default.aspx

Input Director


About Input Director

Input Director is a Windows application that lets you control multiple Windows systems using the keyboard/mouse attached to one computer. It is designed for folks who have two (or more) computers set up at home and find themselves regularly sliding from one system to the other (and wearing out the carpet in the process!). With Input Director, you can share a single keyboard/mouse across a set of systems. You switch which system receives the input either by hotkey or by moving the cursor so that it transitions from one screen to the other (in a very similar fashion to a multi-monitor setup). The idea being that you can position the monitors from two or more systems in a row and use a shared keyboard/mouse to control all of them.Input Director also supports a “shared” clipboard, in which you can copy data onto the clipboard on one system, transition across to another and paste.

Input Director requires Windows 2000 (Service Pack 4), Windows XP (Service Pack 2), Windows 2003 or Windows Vista. The systems must be networked.

Configure a client computer for automatic domain time synchronization

Some computers that are joined to a domain are configured to synchronize from a manual time source. Use the following procedure to configure a client computer that is currently synchronizing with a manually specified computer, to automatically synchronize time with the domain hierarchy.

noteNote
For more information about the w32tm command, type w32tm /? at a command prompt or see Windows Time Service Tools and Settings on the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkId=42984).

Administrative Credentials

To perform this procedure, you must be a member of the Administrators group on the local computer. To perform this procedure from a remote computer, you must be a member of the Domain Admins group.

To configure a client computer for automatic domain time synchronization

  1. Open a Command Prompt.
  2. Type the following command and then press ENTER:w32tm /config /syncfromflags:domhier /update
  3. Type the following command and then press ENTER:net stop w32time
  4. Type the following command and then press ENTER:net start w32time

Administrative Credentials

To perform this procedure locally on the PDC emulator, you must be a member of the Administrators group. To perform this procedure from a remote computer, you must be a member of the Domain Admins group.

To configure the Windows Time service on the PDC emulator

  1. Open a Command Prompt.
  2. Type the following command to display the time difference between the local computer and a target computer, and then press ENTER:

    w32tm /stripchart /computer:target /samples:n/dataonly

    Value Definition
    target Specifies the DNS name or IP address of the NTP server that you are comparing the local computer’s time against, such as time.windows.com.
    n Specifies the number of time samples that will be returned from the target computer to test basic NTP communication.
  3. Open UDP port 123 for outgoing traffic if needed.
  4. Open UDP port 123 (or a different port you have selected) for incoming NTP traffic.
  5. Type the following command to configure the PDC emulator and then press ENTER:

    w32tm /config /manualpeerlist:peers /syncfromflags:manual /reliable:yes /update

    where peers specifies the list of DNS names and/or IP addresses of the NTP time source that the PDC emulator synchronizes from. For example, you can specify time.windows.com. When specifying multiple peers, use a space as the delimiter and enclose them in quotation marks.

  6. w32tm /config /manualpeerlist:time.windows.com /syncfromflags:manual /reliable:yes /update