Monday, March 22, 2010

Favourite ESX Commands

man

ls -al

lsof - list open files

esxtop
c = cpu stats
m = memory
n = network
d = disk
u = disk device (new in 3.5)
v = disk VM (new in 3.5)
s = change update interval (min = 2seconds)
f = choose fields (interactive selection)

esxcfg

lspci - list all pci devices

date

View Volume sizes, Used and Available space
vdf -h (h is 'human readable')
This is an ESX version of the linux DF command. The same command options and syntax applies.

command "| more" one page at a time

command "| grep string" = search output for string

vmkping = ping from the kernel nic
(ping command uses service console interface)

change password
pwd

---------------------------
configure ssh to allow the root user to login Update the ssh configuration file:
vi /etc/ssh/sshd_config

PermitRootLogin yes

Restart the sshdaemon:
service sshd restart

[login over SSH (e.g. Putty or SecureCRT) with a non root account and then SU to super user into root mode].
----------------------------

clear = clear the screen

vmware -v = version

df = disk usage

vdf -h = vhdk disk usage

passwd user = change password for user

useradd test10 = add a new user with username test10

last reboot

last = last users

esxcfg-nics -l
show physical nics and speed

esxcfg-vswif -l
show console ports

esxcfg-vswitch -l
show virtual switches

display cpu and memory usage
top
to quit type q enter

kudzu - detects and configures new hardware
-s runs in safe mode - doesnt disturb hardware.
updates the file /etc/sysconfig/hwconf (currently installed hardware)

cat - equivalent to type command in dos - prints a file to the standard output

Linux Permissions (view using ls -l)
TypeReadWriteExecuteReadWriteExecuteReadWriteExecute
drwx
rwx
rwx

Type can be:
d = directory
l = symbolic link
s = socket
p = named pipe
- = regular file
c= character (unbuffered) device file special
b=block (buffered) device file special

1st rwx = permissions for the owner of the file
2nd rwx = permissions for the group owning the file
3rd rwx = permissions for all other users

nano - text editor similar to VI
Ctrl + X to quit.

Nameserver info held in file:
/etc/resolv.conf

Hosts file
/etc/hosts

See iScsi connections:
cat /proc/scsi/iscsi_vmk/5

Clone a vmdk
vmkfstools -i original.vmdk new.vmdk

-d - optionally specify a disk format (e.g vmfs, thin).

Friday, May 02, 2008

Saturday, January 12, 2008

Citrix - Check name of DSN file Citrix is referencing (ODBC)

Registry Key:
HKLM\Software\Citrix\IMA\DataSourceName

Citrix - Check whether a server is using Direct or Indirect mode to access Datastore

Registry Key:
HKLM\Software\Citrix\IMA\LastPSserver
If the value is a hostname other than the localhost, the datastore is being accessed via Indirect mode (i.e. locally hosted Access or MSDE database on one of the Citrix presentation servers). If the value is not present the server is using Direct mode.

When running in Indirect mode:-
HKLM\Software\Citrix\IMA\PSSERVER
This key indicates the server which is hosting the local access database.

Sunday, June 17, 2007

.NET Class Library Reference

http://msdn2.microsoft.com/en-us/library/aa388745.aspx

Specficially for .NET 1.1
http://msdn2.microsoft.com/en-us/library/aa719441(VS.71).aspx

Saturday, May 05, 2007

FSO Copy Files / Folders

Set objFSO = Wscript.CreateObject("Scripting.FileSystemObject")
FileSystemObject.CopyFile source,destination,1

FileSystemObject.CopyFolder source,destination,1
ARGUMENTS
source , destination, overwrite

N.b
VBScript create object syntax:
Set objFSO = CreateObject("Scripting.FileSystemObject")
WSH create object syntax:
Set objFSO = Wscript.CreateObject("Scripting.FileSystemObject")

VBS & WSH do treat the above differently if parameters are used - see:
http://www.microsoft.com/technet/scriptcenter/guide/sas_wsh_lubv.mspx?mfr=true
heading "Comparing VBScript CreateObject and GetObject Functions with WSH".
 

Friday, December 01, 2006

Sunday, November 12, 2006

VBScript Define and Call Subroutines

Define a Subroutine
Sub subroutineName (passedArg1, passedArg2,....)
Dim .....
Set .....
End Sub

Call a Subroutine
Call subroutineName (inputArg1, inputArg2)

PowerShell

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

Vista Bitlocker Drive Encryption

Technical Overview
http://www.microsoft.com/technet/windowsvista/security/bittech.mspx

Saturday, November 11, 2006

Download WMI Admin Tools link

http://www.microsoft.com/downloads/details.aspx?FamilyId=6430F853-1120-48DB-8CC5-F2ABDC3ED314&displaylang=en

Runas CLI

Using Alternate Credentials from Command Line:
Runas /user:username application

Change Default Script Host

Change default script host to CScript:
CScript.exe //H:CScript

Change default script host to WScript:
CScript.exe //H:WScript

Sunday, October 29, 2006

Using ADSI Authentication / Encryption

http://www.microsoft.com/technet/scriptcenter/resources/qanda/dec04/hey1213.mspx
http://windowssdk.msdn.microsoft.com/en-us/library/ms677047.aspx
http://windowssdk.msdn.microsoft.com/en-us/library/ms679913.aspx

ADSI SSL Port

When performing secure authentication with SSL using a bind in ADSI, the Servers SSL port must be 636.
See microsoft support article:
http://support.microsoft.com/kb/817583

Link to ADSI SDK 2.5

Its old but still very useful:
http://www.microsoft.com/technet/archive/winntas/downloads/adsi25.mspx?mfr=true