Wednesday, December 11, 2013

Tools: Capture Http/https traffic: Web Browsers

This is a good tool to look at how a web application is interacting with browsers on a client machine.

http://fiddler2.com/features

Look at session metrics
Filter captured traffic
Checking headers

Servers: Windows: IIS: Remove Headers

Install Microsoft URL scan and edit C:\Windows\System32\inetsrv\urlscan\UrlScan.ini choose 'Remove Server Header' and configure it to be a '1'.

Software to install Microsoft Urlscan Filter


Tuesday, October 8, 2013

How to restart an unresponse Windows VM from the command line in Citrix xen server

If you have tried to restart or force restart a windows VM from the Citrix console and it does not work you can follow this procedure to make sure it restarts.

Run xe-toolstack-restart from the command line and it will show the virtual machine running state. In this case the virtual machine is not responding.

The dom-id associated with the vm is unresponsive in the xenserver control domain.
You can recover by terminating the dom-id for the virtual  machine or reboot the xen server.

This is the procedure as listed in http://support.citrix.com/article/CTX131421
  1. Run the following command to check the dom-id of the virtual machine in the XenServer control domain:
    list_domains | grep

    Following is a sample of the preceding command:
    [root@Xen6 ~]# list_domains | grep bcdb1445-1f28-9600-ae84-53c254167ae6
    Output :
    51 | bcdb1445-1f28-9600-ae84-53c254167ae6 | H
    51 – the dom-id of the VM
    bcdb1445-1f28-9600-ae84-53c254167ae6 – UUID of the VM
    H – state of the virtual machine (H indicates that this is a HVM guest, typically it means this is a Windows virtual machine.)
    Refer to the Knowledge Center article CTX127896 – How to Use the XenServer Xentop Utility for more information about the other possible Virtual Machine states.
  2. Run the following command to destroy the dom-id of the virtual machine:
  3. destroy_domain –dom-id
  4. Following is a sample of the preceding command:
    /opt/xensource/debug/xenops destroy_domain –domid 51

Monday, October 7, 2013

How to change the owner of a SQL database when the owner has been removed.


On a  server some of the databases are inaccessible to the SA user.
This requires running this command to see who the owner is

sp_helpdb DBNAME

Once you know how to change the owner just run this to change the owner to the SA and you can then perform the admin you require


USE dbname
EXEC sp_changedbowner 'SA'

Wednesday, July 24, 2013

When you a problem with a remove or even a local pc and you are worried that it is not going to restart properly you can force a restart with this command.

shutdown -t 0 -r -f

Tuesday, March 6, 2012

How to identify SQL Collation used

SELECT DATABASEPROPERTYEX('DBName', 'Collation') SQLCollation;




Just type in the DBName of the database you want to check

Thursday, December 8, 2011

Virtualisation: Technologies

Cloudstack takes virtualisation to the next level.


  • Its open source
  • It supports Xen Server, Xen Server Cloud, VMWare, KVM and OracleV


http://cloudstack.com/

Good tools to keep your pc clean

Good tools to keep your pc clean







http://www.piriform.com/

Wednesday, December 7, 2011

Important Security Bulletins

It is essential to follow and act on the latest security trends and apply the recommended patches to systems.
In the ideal world it is best to prevent than react. If you have the systems in place you will be able to put the emphasis into prevention.
Here are some sites that should be followed.
http://secunia.com/advisories/
http://technet.microsoft.com/en-us/security/advisory
http://technet.microsoft.com/en-us/sec
http://www.livehacking.com

Monday, December 5, 2011

How to find mac address - Apple Mac


Click the Apple menu at the top left of the screen
Click 'About This Mac'
Click the 'More Info...' button
Click the 'Network' option;
Look under the 'Ethernet' section, you will see the system's MAC address list

Friday, November 4, 2011

How to determine MTU

cmd, netsh interface ipv4 show subinterfaces

This will show the MTU used for your interfaces

Wednesday, November 2, 2011

Outlook:2010: How to auto add public holidays

This is the process to follow if you want to automatically add public holidays to Outlook 2010.

File > Options > calendar > click the button ‘Add Holidays’ > Choose the country < click

Wednesday, October 19, 2011

SMTP: Relay Server Codes

Code Meaning
200 (nonstandard success response, see rfc876)
211 System status, or system help reply
214 Help message
220 Service ready
221 Service closing transmission channel
250 Requested mail action okay, completed
251 User not local; will forward to
354 Start mail input; end with .
421 Service not available, closing transmission channel
450 Requested mail action not taken: mailbox unavailable
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
503 Bad sequence of commands
504 Command parameter not implemented
521 does not accept mail (see rfc1846)
530 Access denied (???a Sendmailism)
550 Requested action not taken: mailbox unavailable
551 User not local; please try
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
554 Transaction failed
Reply codes grouped by command
Command Code Description
connect
220 Service ready
421 Service not available, closing transmission channel
HELO
250 Requested mail action okay, completed
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
504 Command parameter not implemented
521 does not accept mail [rfc1846]
421 Service not available, closing transmission channel
EHLO
250 Requested mail action okay, completed
550 Not implemented
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
504 Command parameter not implemented
421 Service not available, closing transmission channel
MAIL
250 Requested mail action okay, completed
552 Requested mail action aborted: exceeded storage allocation
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
421 Service not available, closing transmission channel
RCPT
250 Requested mail action okay, completed
251 User not local; will forward to
550 Requested action not taken: mailbox unavailable
551 User not local; please try
552 Requested mail action aborted: exceeded storage allocation
553 Requested action not taken: mailbox name not allowed
450 Requested mail action not taken: mailbox unavailable
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
503 Bad sequence of commands
521 does not accept mail [rfc1846]
421 Service not available, closing transmission channel
DATA
354 Start mail input; end with .
451 Requested action aborted: local error in processing
554 Transaction failed
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
503 Bad sequence of commands
421 Service not available, closing transmission channel
received data
250 Requested mail action okay, completed
552 Requested mail action aborted: exceeded storage allocation
554 Transaction failed
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
RSET
200 (nonstandard success response, see rfc876)
250 Requested mail action okay, completed
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
504 Command parameter not implemented
421 Service not available, closing transmission channel
SEND
250 Requested mail action okay, completed
552 Requested mail action aborted: exceeded storage allocation
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
421 Service not available, closing transmission channel
SOML
250 Requested mail action okay, completed
552 Requested mail action aborted: exceeded storage allocation
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
421 Service not available, closing transmission channel
SAML
250 Requested mail action okay, completed
552 Requested mail action aborted: exceeded storage allocation
451 Requested action aborted: local error in processing
452 Requested action not taken: insufficient system storage
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
421 Service not available, closing transmission channel
VRFY
250 Requested mail action okay, completed
251 User not local; will forward to
550 Requested action not taken: mailbox unavailable
551 User not local; please try
553 Requested action not taken: mailbox name not allowed
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
504 Command parameter not implemented
421 Service not available, closing transmission channel
EXPN
250 Requested mail action okay, completed
550 Requested action not taken: mailbox unavailable
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
504 Command parameter not implemented
421 Service not available, closing transmission channel
HELP
211 System status, or system help reply
214 Help message
500 Syntax error, command unrecognised
501 Syntax error in parameters or arguments
502 Command not implemented
504 Command parameter not implemented
421 Service not available, closing transmission channel
NOOP
200 (nonstandard success response, see rfc876)
250 Requested mail action okay, completed
500 Syntax error, command unrecognised
421 Service not available, closing transmission channel
QUIT
221 Service closing transmission channel
500 Syntax error, command unrecognised
TURN
250 Requested mail action okay, completed
502 Command not implemented
500 Syntax error, command unrecognised
503 Bad sequence of commands

Thursday, September 29, 2011

How to fix a corrupt USB stick

In windows open a command prompt

start > run > cmd > press enter > type "Chkdsk driveletter: /r" > press enter

Check that it can fix and agree with a Y press enter

The system will now try to repair the data.

back up the data if it can be repaired.

Tuesday, September 27, 2011

How to turn on pop logging in Exchange 2007

To start Pop logging you would need to follow these instructions

1.go to C:\Program Files\Microsoft\Exchange Server\ClientAccess\PopImap
2.open Microsoft.Exchange.pop3.exe.config with text editor
3.find and then modify protocolLog from false to true.
4.open services.msc
5.restart the pop service

How to turn on imap logging in Exchange 2007

To start IMAP logging you would need to follow these instructions

1.go to C:\Program Files\Microsoft\Exchange Server\ClientAccess\PopImap
2.open Microsoft.Exchange.Imap4.exe.config with text editor
3.find and then modify protocolLog from false to true.
4.open services.msc
5.restart the imap service

Monday, September 12, 2011

pc:browsers

If you have a problem when no browser will allow a page to be seen but all connectivity is ok i.e. ping, nslookup then delete the files in this location


C:\Users\profile\AppData\Local\Temp

PC:Windows:Hotfixes

%windir%\softwaredistribution\download

To clear

net stop wuauserv
rmdir %windir%\softwaredistribution /s /q
net start wuauserv
exit

PC: remote restart

You can remotely restart a machine from the command line by running the following:

start > run > cmd > type shutdown -i

add the machine name, fill in the details and click ok.

Ping the machine to ensure it is going through a reboot cycle.

Thursday, September 8, 2011