We can find the FSMO from command line by executing just one command and command line :
NETDOM QUERY /D:mydomain.com FSMO
Windows XP and Windows Server 2000 / 2003 have a built-in utility called the System stand-alone Optional Component Manager (sysocmgr.exe) to programmatically add or remove Windows components. Running sysocmgr.exe with no parameters will display the usage. The most basic command line is:
%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf This parameter (/i:) is always required and specifies the location of the master inf (%windir%\inf\sysoc.inf). When run it simply displays the Windows Components Wizard. Therefore the above command can be used as a shortcut directly to the Windows Components Wizard.
The real power of sysocmgr is in unattended mode. Additional parameters control the user interface, handle restarting, and control which components are added or removed by way of a standard Windows unattended answer file. Sysocmgr only looks in the [Components] and [NetOptionalComponents] sections, so the answer file can be specifically for component management or reused from a Windows unattended installation. Some components have their own unattended answer file sections, which are also parsed.
The following example uses an answer file (/u:) named ocm.txt in the temporary directory (%temp%\ocm.txt), suppresses any necessary restart (/r), and displays no user interface (/q):
%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:%temp%\ocm.txt /r /q
The following example answer file adds the Simple Network Management Protocol (SNMP) service and configures the agent settings:
SNMP = 1
Contact_Name = Michael Khanin
Location = Canada
Service = Physical, Applications, End-to-End
Community_Name = Public
Traps = server1.thesystemadministrator.com, server2.thesystemadministrator.com
Send_Authentication = Yes
Accept_CommunityName = Public:Read_Only
Any_Host = No
Limit_Host = server1.thesystemadministrator.com, server2.thesystemadministrator.com
- Sysocmgr can only be run by users with local administrative rights. It can be combined with runas, e.g.,
runas /user:admin “%windir%\system32\sysocmgr.exe /i:%windir%\inf\sysoc.inf”
- Make sure that the target system has the Windows installation source available. The following registry values must point to a source to which the administrative user has access (e.g., if a network path, a local administrator account may not be able to access it):
“Installation Sources”= … (REG_MULTI_SZ value)
Recently, I needed to find a free solution to creating a PDF file by using virtual network printer. The idea was send the job to the pdf virtual pdf-printer, then the user is prompted to ‘save as’, they select a location and the pdf is created.
After googleng and testing the solution was done.
I’ve used Bullzip to print pdf as a shared network printer. By doing few changes to the global. ini, Bullzip are then able to output pdf without any dialogue.
Here is a changes in the global.ini:
If for any reason, you need to know how many users are logged on to a server, It’s easy to check, at the server’s console (CMD.EXE) execute the following command:
NET SESSION | FIND /C “\\”
Windows 2000 or Windows XP can be configured to run a startup script that is a batch file, VB script or JScript by using Group Policies. As well we can use AutoExnt utility, from the Resource Kit.
The AutoExNT service permits an administrator to configure a Windows based computer to run a custom batch file when first starting the computer. Also, a user or administrator is not required to be logged on at the time this custom batch file runs.
To start using AutoExNTdo the following steps:
Installing the AutoExNT Service
- Using a text editor (such as Notepad), create a batch file named Autoexnt.bat and include the commands you want to run at startup in this file.
- Copy the Autoexnt.bat file you just created, in addition to the Autoexnt.exe, Servmess.dll, and Instexnt.exe files located in the Resource Kit CD-ROM to the %SystemRoot%\System32 folder on your computer.
- At a command prompt, type instexnt install, and then press ENTER.
You should then receive the following message:
CreateService AutoExNT SUCCESS with InterActive Flag turned OFF
To view the installation processes running on the desktop, you must install the AutoExNT service using the /interactive switch. For example, instead of typing instexnt install, you would type instexnt install /interactive at a command prompt, and then press ENTER.
Testing the AutoExNT Service
To test the AutoExNT service, log on to your computer with an account that has administrator credentials, type net start autoexnt at a command prompt, and then press ENTER. The Autoexnt.bat file should run in an MS-DOS window.
NOTE: The AutoExNT service includes a /interactive switch, analogous to the /interactive switch of the AT command. This switch permits you to view the status of processes as they run. Because no user environment variables have yet been declared when AutoExNT runs at system startup, you must use full path names.
Also, if you need a service to be running before you start running a dependent process, you may include a command to start this service at the beginning of your Autoexnt.bat file. For example, if your batch file has commands that require the Server service to be running, include a net start server command at the beginning of your Autoexnt.bat file.
Configuring the AutoExNT Service to Run at Startup
To configure the AutoExNT service to run at startup:
- Click Start, point to Programs, point to Administrative Tools, and then click Computer Management.
- Double-click the Services and Applications branch to expand it, and then click Services.
- Double-click the AutoExNT service, click Automatic in the Startup type box, and then click OK.
Video by Mike Nash
Windows Server 2008 R2 will include Hyper-V 2.0, it promises to deliver the final pieces for enterprise level OS virtualization and to really compete with VMware at that level.
The most anticipated is of course Live Migration: moving running VM’s from one host to another without interruption of services running inside the VM’s. To accomplish this technique a new Shared Filesytem is needed and so will also be introduced in Hyper-V 2.0: Clustered Shared Volumes.
The Live migration works best together with System Center Virtual Machine Manager 2008, it can provide additional Live Migration management and orchestration scenarios such as Live Migration via policy.
Cool thing is you only need to update to Hyper-V 2.0, none of the rest of the infrastructure needs updating.
Logical Processor Support
- Support for 32 logical processors on host computer
- Twice the initial supported number of logical processors of Windows Server 2008 Hyper-V
Hot add remove Storage
- Add and remove VHD and pass-through disks to a running VM without requiring a reboot.
- Hot-add/remove disk only applies to VHDs and pass-through disks attached to the SCSI controller (not the IDE controller)
- Hot-add remove of storage controllers is not supported
- Enables storage growth in VMs without downtime
- Enables additional datacenter backup scenarios
Second Level Translation (SLAT)
- Leverage new processor features to improve performance and reduce load on Windows Hypervisor
- AMD: Enhanced Page Tables
- Intel: Nested Page Tables
- Improved memory management performance
- Memory usage of Windows Hypervisor will decrease from approximately 5% to 1% of total physical memory.
- More memory will be available for child partitions enabling higher consolidation ratios
- Pool of memory is dynamically distributed across VMs
- Memory is dynamically allocated/removed based VM usage with no service interruption
- Enables much higher consolidation ratios per host by addressing the greatest limiting factor to consolidation: Memory
- VM memory configuration includes:
- Initial (what VM will boot with)
- Minimum (what VM is guaranteed)
- Maximum (what VM can grow to)
- Memory is added via Hot-Add MEM functionality
- Memory is removed via Balloon driver (supported OSs)
Boot from VHD
Allows any VHD to work on physical hardware, this is very interesting! Boot an OS VHD on your physical hardware.
You can find more information at the WinHEC session descriptions: http://www.microsoft.com/whdc/winhec/2008/sessions.aspx
It’s a lot of posts that explained how to detect HAL. Almost all of those solutions done in VB script. As well I’ve seen a lot of post about “problems’ running VB script under WinPE. So, one day I tried to create a batch file, that allows to detect a HAL under WinPE. I did all my tests under VistaPE 12 (I’ve used the VistaPE v.12 RC1).
Here is content of HAL_Detector.bat script:
REM . – Advanced Configuration and Power Interface (ACPI) PC: ACPIPIC_UP
REM . – ACPI Uniprocessor PC: ACPIAPIC_UP
REM . – ACPI Multiprocessor PC: ACPIAPIC_MP
REM . Advanced Configuration and Power Interface (ACPI) PC
REM . – halacpi.dll (renamed to hal.dll)
REM . – ntkrnlpa.exe
REM . – ntoskrnl.exe
REM . ACPI Uniprocessor PC
REM . – halaacpi.dll (renamed to hal.dll)
REM . – ntkrnlpa.exe
REM . – ntoskrnl.exe
REM . ACPI Multiprocessor PC
REM . – halmacpi.dll (renamed to hal.dll)
REM . – ntkrpamp.exe (renamed to ntkrnlpa.exe)
REM . – ntkrnlmp.exe (renamed to ntoskrnl.exe)
REM ……………….. Explanation About Diferent HAL Versions ………………… ……..
For /F “Tokens=3 Delims= ” %%a in (‘REG QUERY HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL000 /v HardwareID’) DO Set PC-HAL=%%a
IF %PC-HAL% == acpipic Set New-HAL=ACPI_Uniprocessor_PC
IF %PC-HAL% == acpiapic (
For /F %%a in (‘@WMIC COMPUTERSYSTEM GET NumberOfLogicalProcessors /value^|find “NumberOfLogicalProcessors”‘) do Set %%a
IF %NumberOfLogicalProcessors% == Set New-HAL=HAL_NOT_DETECTED
IF %NumberOfLogicalProcessors% == 1 Set New-HAL=ACPI_Uniprocessor_PC
IF %NumberOfLogicalProcessors% == 2 Set New-HAL=ACPI_Multiprocessor_PC
IF %NumberOfLogicalProcessors% == 4 Set New-HAL=ACPI_Multiprocessor_PC
@echo Detected HAL: %New-HAL%
@echo Number of Logical Processors: %NumberOfLogicalProcessors%
If you need to change Time Zone for a lot XP computers, you can do this by simple command:
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z Central Standard Time
to change Time Zone to Jerusalem (GMT+02:00) run the following command:
RunDLL32.exe shell32.dll,Control_RunDLL timedate.cpl,,/Z (GMT+02:00) Jerusalem
If for what ever reason you need to repair installation of .NET 2. x, you can do this from command line by running the following command:
“C:\WINDOWS\microsoft.NET\Framework\v2.0.50727\Microsoft .NET Framework 2.0\install.exe” /qb! /norestart