Useful commands for Windows

How many users are logged on/connected to a server

 NET SESSION | FIND /C "\"

Who is logged on to a computer

NBTSTAT -a remotecomputer | FIND "<03>" | FIND /I /V "remotecomputer"

What is the full name for this login name

NET USER loginname /DOMAIN | FIND /I " name "
or
DSQUERY USER -samid *loginname* | DSGET USER -samid -display

When did someone last change his password

NET USER loginname /DOMAIN | FIND /I "Password last set"

How to reset someone’s password

NET USER loginname newpassword /DOMAIN

Is someone’s account locked

NET USER loginname /DOMAIN | FIND /I "Account active"

How to unlock a locked account

NET USER loginname /DOMAIN /ACTIVE:YES

or, if the password needs to be reset as well:

NET USER loginname newpassword /DOMAIN /ACTIVE:YES

List all domains and workgroups in the network

NET VIEW /DOMAIN

List all computers in the network

NET VIEW

List all domain controllers

2000 Server:
NETDOM QUERY /D:MyDomain DC
2003 Server:
DSQUERY Server

List all drivers on any PC

DRIVERQUERY /V /FO CSV > %ComputerName%.csv

List all printers on any PC

WMIC /Node:remote_PC Path Win32_Printer Get DeviceID

Disable Windows Firewall for domain only

NETSH Firewall Set OpMode Mode = DISABLE Profile = DOMAIN

Completely disable Windows Firewall

SC [ \Remote_computer ] Stop SharedAccess
SC [ \Remote_computer ] Config SharedAccess start= disabled

List all local administrators

 

NET LOCALGROUP Administrators

Delete a computer account

NETDOM /DOMAIN:MyDomain MEMBER \computer2Bdeleted /DELETE

Connect multiple skype accounts under one account

Create a shortcut to Skype.exe and place it on Desktop or start menu. Use a name the will help you clarify which account is which. Start Skype using this shortcut and setup your first account.

Then create another shortcut to Skype.exe with a different name. Open the “Properties” of this shortcut by right-clicking on it. In the “Target” text field of the properties dialog box, append ” /secondary” (do not use the quotes) to the Skype.exe path that is already there.
For example: “C:Program FilesSkypePhoneSkype.exe” /secondary

Now you can change icons in order to identify easier each account

Well known but usefull shortcut keys for Windows

Any version of Microsoft Windows

Shortcut Keys

Windows Key + D

Minimizes all windows and shows desktop. Also reopens all windows.

Windows Key + E

Opens a new Windows Explorer window.

Windows Key + F

Opens a new find or search function. Typically done by clicking Start, Find or Start, Search.

Windows Key + L

Locks your workstation so no one can access your desktop without your password.

Windows Key + M

Minimizes all windows.

Windows Key + M + Shift

Reopens all minimized windows.

Shortcut Keys [continued]

Windows Key + R

Opens the run command. Typically done by clicking on Start, Run.

Alt + Tab

Switches between your open windows.

Windows Vista SP2 RC

Microsoft has released RC Escrow build of Windows Vista and Server 2008 SP2. A few selected testers have been e-mailed by Microsoft about this latest build.

The build number is 6002.16659.090114-1728 and is very close to RTM version.

The build can be downloaded via Windows Update using a small registry script or as a standalone installer or slipstreamed ISO.

The ISO version is available in 5 languages: English, Spanish, German, French, Japanese.

The build doesn’t support upgrade from previous SP2 build, so you’ll need to uninstall any previous build of SP2 before installing this RC build.

RC build can be uninstalled from «Control Panel -> Programs and Features -> View Installed Updates«

Mac OSX Leopard Snow vs Windows 7

AppleInsider has published an in depth look at the competitive origins of Windows 7 and Mac OS X and why the products aren’t really direct competitors.

The operating system most users end up with will depend upon what hardware they choose to buy, not the specific feature details of the software that system happens to run. History reveals that the hardware decision isn’t going to be based primarily upon features.

The following presents a historical overview of the competition between Apple and Microsoft in the operating system market leading up to this year’s face off between Windows 7 and Snow Leopard. While modern Macs can now also run Windows, Apple is the only PC maker to refrain from actually licensing it from Microsoft as an OEM; in contrast, Apple’s Mac OS X only legally runs on the company’s own premium PCs. That has enabled Mac OS X to differentiate Apple’s hardware from other PC vendors using easy to demonstrate software features and tighter hardware integration, winning back some of the ground Apple lost during the decade of the 90s.

Read More

 

MacOSX leopard Snow

MacOSX leopard Snow

 

Windows 7

Windows 7

How to configure TCP/IP settings from the Command Prompt in Windows

In order to configure TCP/IP settings such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses and many other options you can use Netsh.exe.

With Netsh.exe you can easily view your TCP/IP settings. Type the following command in a Command Prompt window (CMD.EXE):

netsh interface ip show config

With Netsh.exe, you can easily configure your computer’s IP address and other TCP/IP related settings. For example:

The following command configures the interface named Local Area Connection with the static IP address 10.0.0.100, the subnet mask of 255.255.255.0, and a default gateway of 10.0.0.1:

netsh interface ip set address name=»Local Area Connection» static 10.0.0.100 255.255.255.0 10.0.0.1 1 (The above is one long line)

If you want to export your current ip settings:

netsh -c interface dump > c:mySettings.txt 

If you want to import your ip settings:

netsh -f c:mySettings.txt

or instead of -f

netsh exec c:mySettings.txt

To automatically obatin an IP address using DHCP:

netsh interface ip set address «Local Area Connection» dhcp

DNS settings:

netsh interface ip set dns «Local Area Connection» static 10.0.0.254

WINS settings:

netsh interface ip set wins «Local Area Connection» static 10.0.0.254

Auto DNS settings:

netsh interface ip set dns «Local Area Connection» dhcp

Usefull links:

Link one and Link two

How to login as an administrator in Windows XP

The built-in Administrator account is hidden from Welcome Screen when a user account with Administrator privileges exists and enabled. In Windows XP Home Edition, you can login as built-in Administrator in Safe Mode only. For XP Professional, press CTRL + ALT + DEL twice at the Welcome Screen and input your Administrator password in the classic logon window that appears.

HAL.DLL is Missing

Option 1:

Boot from your CD and follow the directions to start Recovery Console. Then:

Attrib -H -R -S C:Boot.ini

DEL C:Boot.ini

BootCfg /Rebuild

Fixboot

 

Option 2:

Boot from your CD and follow the directions below to start Recovery Console.

Insert the Setup compact disc (CD) and restart the computer. If prompted, select any options required to boot from the CD. 
When the text-based part of Setup begins, follow the prompts; choose the repair or recover option by pressing R. 

If you have a dual-boot or multiple-boot system, choose the installation that you need to access from the Recovery Console. 
When prompted, type the Administrator password. (if you didn’t create one try pressing enter).

At the system prompt, type Recovery Console commands; type help for a list of commands, or help commandname for help on a specific command. 

Most likely you will need to expand the file from the CD. The command would be expand d:i386hal.dl_ c:windowssystem32hal.dll. Substitute d: for the drive letter of your CD. Once you have expanded the file type «exit» to exit the Recovery Console and restart the computer.  

TIP:  Recovering Windows XP using the Recovery Console

Force a shutdown in Windows

rundll32.exe shell32.dll,SHExitWindowsEx 4

The above will shutdown any running processes and shutdown your computer without saving any data or warning. It should only be used if you have problems shutting down normally.

Note the numbers at the end of each of the above command lines. They are what make the different actions possible and they can be combined. The most common combination is using the Force shutdown action with a restart. Restart = 2 Force =4, so you would just add 6 to the end of the main command line:
rundll32.exe shell32.dll,SHExitWindowsEx 6

If your computer supports the power-off feature, you can also use the number 8 which is a Power Off action which will not only shutdown your computer, but turn off the power too.rundll32.exe shell32.dll,SHExitWindowsEx 8

To summarize:

0 = Logoff
1 = Shutdown
2 = Restart
4 = Forced Shutdown
8 = Power Off (Shutdown and turn off Power)