Showing posts with label Command prompt. Show all posts
Showing posts with label Command prompt. Show all posts

2016-03-30

Tool: How to get IBM MPIO disk UID from cmd

Some times we can have many different disks from different vendors connected to several servers, and to avoid such complexity we need general identity to identify disk on all OS, applications equally.

How to obtain IBM MPIO disk UID from Windows Server where is attached IBM SAN disk?
Run the sample by opening a Command Prompt window in catalog IBM MPIO <C:\Program Files\IBM\SDDDSM> (make sure already IBM Subsystem Device Driver Device Specific Module (SDDDSM) is installed ) and typing the following command at the command prompt:

datapath query device

In cmd output find  32 digits long number after word SERIAL and that number is your UID.


/Geecoholic

2016-03-17

Cmd: I'm local administrator?

How to check if current logged in user has local administrator rights.

Run the sample by opening a Command Prompt window and typing the following command at the command prompt:

whoami /groups | find /i "BUILTIN\Administrators"


If any string is returned, yes you are Administrator!

/Geecoholic

2016-03-07

Logoff all users from Windows RDS/Terminal Server using cmd

How to logoff all users in server except administrator? Save sample below to a file named userslogoff.cmd to c:\temp directory:

query session |find /i "tcp#" | find /v /i "administrator" >session.txt
for /f "skip=1 tokens=3," %%i in (session.txt) DO logoff %%i
del session.txt


Run the sample by opening a Command Prompt window and typing the following command at the command prompt:

cd\
cd temp
userslogoff.cmd


Logoff command do not prevent uses for new logins, use command to disable new logins:

change logon /disable


Logons are re-enabled when you restart the system or use command to enable:

change logon /enable


/Geecoholic

2016-03-02

Tool: How to expand Windows 2003 partition without server restart

I know that Windows 2003/XP is very old, not more supported by MS, they have many security holes and more blablabla, but they still exist and we need powerful tools for online partitions(particularly system) expand like in Windows 2008/2012/10.

Good news is such tool for command prompt ExtPart.exe exist on Dell support site: Dell Basic Disk Expansion.

Official MS KB for expansion with build-in tools if you want try in MS way before Dell.

/Geecoholic

2016-02-27

Windows OS disk backup from cmd

How to make Windows OS/System disk (C:) and related boot partitions backup using Command prompt:

WbAdmin start backup -backupTarget:W: -include:C: -allCritical -quiet

where W: is removable USB or other disk. W: can be replaced to network path \\server\backup

/Geecoholic