Memorise

Create/edit user in HP SAN MSA2312i

Create user John who will view system information using base 2 in SMU:
# create user base 2 interfaces wbi level monitor John
Enter new password: ********
Re-enter new password: ********
Success: Command completed successfully. (John) – The new user was created.
(2012-01-20 15:54:35)
Create user MIB that can view the SNMP MIB, using authentication and encryption:
# create user interfaces snmpuser password Abcd1234 authentication-type SHA
privacy-type AES privacy-password Abcd5678 MIB
Success: Command completed successfully. (MIB) – The new user was created.
(2012-01-20 15:54:45)
Create user Traps that can receive SNMP trap notifications, using authentication without
encryption:
# create user interfaces snmptarget authentication-type MD5 trap-host
172.22.4.171 Traps
Enter new password: *********
Re-enter new password: *********
Success: Command completed successfully. (Traps) – The new user was created.
(2012-01-20 15:54:55)

 

Change the temperature scale and accessible interfaces for user jsmith:
# set user jsmith temperature-scale f interfaces wbi,cli
Success: Command completed successfully. – The settings were changed
successfully. (2012-01-21 14:39:50)
Change the password for user JDoe:
# set user JDoe password Abcd%1234
Success: Command completed successfully. – The settings were changed
successfully. (2012-01-21 14:39:56)
Change the authentication type for SNMPv3 user Traps:
# set user Traps authentication-type MD5 password Snmp%Trap
Success: Command completed successfully. – The settings were changed
successfully. (2012-01-12 14:40:10)
For the only CLI user with the manage role, try to reduce the role to monitor:
# set user SysAdmin roles monitor
Error: At least one CLI user must retain configuration privileges at all times.
(2013-10-31 14:10:47)

 

Show configured users:
# show users
Username Roles User Type User Locale WBI CLI FTP SMI-S SNMP
Authentication Type Privacy Type Password Privacy Password
Trap Host Address
—————————————————————————-
ftp manage,monitor Standard English x
********
MIB monitor Standard English U
SHA AES access_MIB MIB_access
manage manage,monitor Standard English x x x x
********
monitor monitor Standard English x x
********
Traps monitor Standard English T
SHA AES _Abc123_ _123Abc_
172.22.4.171
Rivera manage,monitor Standard Spanish x x
********
—————————————————————————-
Success: Command completed successfully. (2012-02-19 15:31:12)

 

If you have problem logging into Web Management this could be due to SSL cert error in browser. SSH to SAN then Enable http on SAN using cli below, then try login using http:// instead of https://. You can always create new user using the cli above.

Example Enable/Disable unsecure HTTP connections and enable FTP:
# set protocols http disabled ftp enabled
# set protocols http enabled ftp enabled

Success: Command completed successfully. (2012-01-21 14:46:55)

 


2008 RC1 DC: DomainControllerAuthentication Certificate Request error

Certificate enrollment for Local system failed to enroll for a DomainController certificate from (The RPC server is unavailable. 0x800706ba (WIN32: 1722)).

We have seen this for Vista/server 2008 trying to register for V2 templates agains 2003 CAs and suspect the same issue would be present in Windows Server 2008.  The following steps should resolve this:

1. Please check to ensure that a new security group, CERTSVC_DCOM_ACCESS, has been created after Windows Server 2003 SP1 or later has been applied.

2. Please add the “Domain Users”, “Domain Computers”, “Domain Controllers” groups to the new CERTSVC_DCOM_ACCESS security group.

3. Then we can have Certificate Services update the DCOM security settings by running the following commands:

certutil -setreg SetupStatus -SETUP_DCOM_SECURITY_UPDATED_FLAG

net stop certsvc

net start certsvc.


setup NTP server

Download from
http://www.meinbergglobal.com/english/sw/ntp.htm#ntp_stable
http://support.ntp.org/bin/view/Main/SoftwareDownloads

install steps are here: http://www.satsignal.eu/ntp/setup.html

 


Powering off the virtual machine

Powering off the virtual machine
To determine if you must use the command line, attempt to power off the virtual machine:
  1. Connect VMware Infrastructure/vSphere Client to the vCenter Server. Right-click the virtual machine and click Power off.
  2. Connect vSphere Client directly to the ESX host. Right-click the virtual machine and click Power off. 

    If this does not work, you must use the command line method.

Determining the virtual machine’s state
  1. Determine the host on which the virtual machine is running. This information is available in the virtual machine’s Summary tab when viewed in the vSphere Client page.
  2. Log in as root to the ESX host using an SSH client.
  3. Run this command to verify that the virtual machine is running on this host:# vmware-cmd -l

    The output of this command returns the full path to each virtual machine running on the ESX host. Verify that the virtual machine is listed, and record the full path for use in this process. For example:

    # /vmfs/volumes/<UUID>/<VMDIR>/<VMNAME>.vmx

  4. Run this command to determine the state in which the ESX host believes the virtual machine to be operating: 

    # vmware-cmd <path.vmx> getstateIf the output from this commandisgetstate() = on, the vCenter Server may not be communicating with the host properly. This issue must be addressed in order to complete the shutdown process.

    If the output from this command is getstate() = off, the ESX host may be unaware it is still running the virtual machine. This article provides additional assistance in addressing this issue.

Powering off the virtual machine using the vmware-cmd command
Caution: If you want to collect the virtual machine logs to assist in troubleshooting, do not perform the steps in this section.
This procedure uses the ESX command line tool and attempts to gracefully power off the virtual machine. It works if the virtual machine’s process is running properly and is accessible. If unsuccessful, the virtual machine’s process may not be running properly and may require further troubleshooting.
  1. From the Service Console of the ESX host, run the command:

    vmware-cmd <path.vmx> stop

Note<path.vmx>is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command:

# vmware-cmd <path.vmx> getstate

 

  • From the Service Console of the ESX host, run the command:

    # vmware-cmd <path.vmx> stop hard

 

Note:<path.vmx>is the complete path to the configuration file, as determined in the previous section. To verify that it is stopped, run the command:

# vmware-cmd <path.vmx> getstate

 

  • If the virtual machine is still inaccessible, proceed to the next section.

 

 

Powering off the virtual machine while collecting diagnostic information using the vm-support script
Use this procedure when you want to investigate the cause of the issue. This command attempts to power off the virtual machine while collecting diagnostic information. Perform these steps in order, as they are listed in order of potential impact to the system if performed incorrectly.
Perform these steps first:
  1.  Determine the WorldID of the virtual machine with the command:

# vm-support -x

 

    1. Kill the World_ID of the virtual machine by using this command in the root directory of the host:

      # vm-support -X <world_ID>

 

It can take upwards of 30 minutes to terminate the virtual machine. Exercise patience to avoid corruption.

Note: This command uses several different methods to stop the virtual machine. When attempting each method, the command waits for a predetermined amount of time. The timeout value can be configured to be 0 by adding the -d0 switch to the vm-support command.

If the preceding steps fail, perform these steps for an ESX 3.x host:
  1. List all running virtual machines to find the VMID of the affected virtual machine with the command: 

    # cat /proc/vmware/vm/*/names

 

  • Determine the master world ID with the command:

 

# cat /proc/vmware/vm/####/cpu/status | less

 

  • Scroll to the right with the arrow keys until you see the group field. It appears similar to:

 

Group
vm.####

 

  • Run this command to shut the virtual machine down with the group ID:

 

# /usr/lib/vmware/bin/vmkload_app -k 9 ####

 If the preceding steps fail, perform these steps for an ESX 4.x host:
  1. List all running virtual machines to find the vmxCartelID of the affected virtual machine with the command: 

    # /usr/lib/vmware/bin/vmdumper -l

  2. Scroll through the list until you see your virtual machine’s name. The output appears similar to: 

    vmid=5151 pid=-1 cfgFile=”/vmfs/volumes/4a16a48a-d807aa7e-e674-001e4ffc52e9/mdineeen_test/vm_test.vmx” uuid=”56 4d a6 db 0a e2 e5 3e-a9 2b 31 4b 69 29 15 19″ displayName=”vm_test” vmxCartelID=#### 

  3. Run this command to shut the virtual machine down with the vmxCartelID:# /usr/lib/vmware/bin/vmkload_app -k 9 ####

 

Using the ESX command line to kill the virtual machine
If the virtual machine does not power off using the steps in this article, it has likely lost control of its process. You must manually kill the process at the command line.
Caution: This procedure is potentially hazardous to the ESX host. If you do not identify the appropriate process ID (PID), and kill the wrong process, it may have unexpected results. If you are not comfortable with these procedures, contact VMware Technical Support and open a Service Request. Refer to this article when you create the SR. 

  1. To determine if the virtual machine process is running on the ESX host, run the command: 

    # ps auxwww | grep -i <VMNAME>.vmxThe output of this command appears similar to this if the .vmx process is running:

    root 3093 0.0 0.3 2016 860 ? S< Jul30 0:17 /usr/lib/vmware/bin/vmkload_app /usr/lib/vmware/bin/vmware-vmx -ssched.group=host/user -# name=VMware ESX Server;version=3.5.0;licensename=VMware ESX Server;licenseversion=2.0 build-158874; -@ pipe=/tmp/vmhsdaemon-0/vmx569228e44baf49d1; /vmfs/volumes/49392e30-162037d0-17c6-001f29e9abec/<VMDIR>/<VMNAME>.vmx

    The process ID (PID) for this process is in bold. In this example, the PID is 3093. Take note of this number for use in these steps.

    Caution: Ensure that you identify the line specific only to the virtual machine you are attempting to repair. If you continue this process for a virtual machine other than the one in question, you can cause downtime for the other virtual machine.

    If the .vmx process is listed, it is possible that the virtual machine has lost control of the process and that it must be stopped manually. 

  2. To end the process, run the command:# kill <PID>
  3. Wait 30 seconds and check for the process again.
  4. If it is not terminated, run the command:# kill -9 <PID>
  5. Wait 30 seconds and check for the process again.
  6. Where possible, it may be necessary to migrate the virtual machine to another host and attempt the kill instruction from that host.
  7. If it is not terminated, the ESX host may need to be rebooted to clear the process. This is a last resort option, and should only be attempted if the preceding steps in this article are unsuccessful. 

Changing the IP address, default gateway, and hostname of the Service Console in ESX

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=4309499

 

Changing settings from the physical or remote console connection

Changing the IP for the Service Console must be done from the physical console or through a remote console session. If you make changes through a network connection such as SSH, network connectivity to the Service Console disconnects because the Service Console’s network interface changes.

  1. Run this command to set the IP address:

    [root@server root]# esxcfg-vswif -i a.b.c.d -n w.x.y.z vswif0

    where a.b.c.d is the IP address and w.x.y.z is the subnet mask.

    Note: In this example, vswif0 is the Service Console adapter that is the interface to which you are applying the IP address change.

  2. Open the /etc/hosts file with a text editor and modify it so that it reflects the correct IP address and hostname.

    Note: You are required to edit files on an ESX host. For more information, see Editing files on an ESX host using vi or nano (1020302).

    Note: You may also need to verify and change the file /etc/vmware/esx.conf file for the hostname and IP address.

  3. To change the default gateway address and the hostname, edit the /etc/sysconfig/network file and change the GATEWAY and HOSTNAME parameters to the proper values.
  4. For the changes to take effect, restart the network service with the command:

    [root@server root]# service network restart

    Note: If you are required to edit the hostname, then you must reboot the host.

    Note: This command breaks any current network connections to the Service Console, but virtual machines continue to have network connection. If the ESX host is managed by VirtualCenter or vCenter Server, you may have to remove and re-add the host to the inventory. For more information, see ESX not working properly in VirtualCenter after IP address change (1005633).

Note: Making changes to IP and DNS server settings can have a negative impact on the normal operation of ESX/ESXi, particularly in HA clustered environments. For more information, see Identifying issues with and setting up name resolution on ESX/ESXi Server (1003735).

Note: If the changed IP does not persist across a reboot, try deleting and recreating the Service Console vswif management interface. For more information, see Recreating Service Console networking from the command line (1000266).


Troubleshoot errors when you save Excel files “Document not saved.”

Excel documents saved fine this AM now I am getting the message “!document not saved” in Excel only. What is it? and How do I fix it?Document not saved

Fix worked for me: check the document to see if there is any image embedded, just start removing them one at at time and identified small logo was corrupt and was causing “Document not saved.” error. after removing the image file saved without any issue.

 


When old CA was not correctly decomissioned

You can check for all CA in domain by Running the following command from a CMD prompt: “certutil -config – -ping” it will prompt you with all the CA available in the organisation.

To remove from domain Open PKIView.msc, right-click on root node and select Manage AD Containers. Go through all tabs and remove items related to old CA. I have used this on Windows 2008 Server.


Taking ownership of a file

Taking ownership of a file
Open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as Administrator.

Type the following command and press ENTER:

TAKEOWN /F
(Replace the text
with the full path of the actual file.)

If the operation was successful, you should see the following message:

“SUCCESS: The file (or folder): “filename” now owned by user “Computer Name\User name”.”

Then to assign the Administrators group Full Control Permissions for the file, you may use the ICACLS command. Use this syntax:

ICACLS /grant administrators:F
Taking ownership of a folder
Use the following syntax:

takeown /f /r /d y
Then to assign the Administrators group Full Control Permissions for the folder, use this syntax:

icacls /grant administrators:F /T
The /T parameter is added so that the operation is carried out through all the sub-directories and files within that folder.

Command-line help: To know more information about the above commands, run these commands from a Command Prompt window.

takeown /?

icacls /?


Steps to move a DHCP database from a Windows Server to another Windows Server

The DHCP database can be moved or migrated from a Windows Server 2003 server to a Windows Server 2008 server, or from one Windows Server 2008 server to another. The information below details the necessary steps.

Export the DHCP database from a server that is running Microsoft Windows Server 2003 or Windows Server 2008

To move a DHCP database and configuration from a server that is running Windows Server 2003 or Windows Server 2008 to another server that is running Windows Server 2008:

1. Log on to the source DHCP server by using an account that is a member of the local Administrators group.

2. Click Start, click Run, type cmd in the Open box, and then click OK.

3. Type netsh dhcp server export C:\dhcp.txt all , and then press ENTER.

Note: You must have local administrator permissions to export the data.

Configure the DHCP server service on the server that is running Windows Server 2008

1. Click Start, click Administrative Tools, click Server Manager. If needed acknowledge User Account Control.

2. In Roles Summary click Add Roles, click Next, check DHCP server, and then click Next.

Import the DHCP database

1. Log on as a user who is an explicit member of the local Administrators group. A user account in a group that is a member of the local Administrators group will not work. If a local Administrators account does not exist for the domain controller, restart the computer in Directory Services Restore Mode, and use the administrator account to import the database as described later in this section.

2. Copy the exported DHCP database file to the local hard disk of the Windows Server 2008-based computer.

3. Verify that the DHCP service is started on the Windows Server 2008-based computer.

4. Click Start, click Run, type cmd in the Open box, and then click OK.

5. At the command prompt, type netsh dhcp server import c:\dhcpdatabase.txt all , and then press ENTER, where c:\dhcpdatabase.txt is the full path and file name of the database file that you copied to the server.

Note When you try to export a DHCP database from a Windows 2000/2003 domain controller to a Windows Server 2008 member server of the domain, you may receive the following error message:

Error initializing and reading the service configuration – Access Denied

Note You must have local administrator permissions to import the data.

6. To resolve this issue, add the Windows Server 2008 DHCP server computer to the DHCP Admins group at the Enterprise level and redo steps 4 & 5.

7. If the “access is denied” error message occurs after you add the Windows Server 2008 DCHP server computer to the DHCP Admins group at the Enterprise level that is mentioned in step 6, verify that the user account that is currently used to import belongs to the local Administrators group. If the account does not belong to this group, add the account to that group, or log on as a local administrator to complete the import and redo steps 4 & 5.

Authorize the DHCP server

1. Click Start, point to All Programs, point to Administrative Tools, and then click DHCP.

Note You must be logged on to the server by using an account that is a member of the Administrators group. In an Active Directory domain, you must be logged on to the server by using an account that is a member of the Enterprise Administrators group.

2. In the console tree of the DHCP snap-in, expand the new DHCP server. If there is a red arrow in the lower-right corner of the server object, the server has not yet been authorized.

3. Right-click the server object, and then click Authorize.

4. After several moments, right-click the server again, and then click Refresh. A green arrow indicates that the DHCP server is authorized.


Upgrade/Change Windows Server to different version using KMS

Converting evaluation versions of Windows Server 2012 to full retail versions 

Most evaluation versions can be converted to full retail versions, but the method varies slightly depending on the edition. Before you attempt to convert the version, verify that your server is actually running an evaluation version. To do this, do either of the following:

  1. From an elevated command prompt, run slmgr.vbs /dlv; evaluation versions will include “EVAL” in the output.
  2. From the Start screen, open Control Panel. Open System and Security, and then System. View Windows activation status in the Windows activation area of the System page. Click View details in Windows activation for more information about your Windows activation status.

If you have already activated Windows, the Desktop shows the time remaining in the evaluation period.

If the server is running a retail version instead of an evaluation version, see the “Upgrading previous licensed versions” section of this document for instructions to upgrade to Windows Server 2012.

For Windows Server 2012 Essentials: You can convert to the full retail version by entering a retail, volume license, or OEM key in the command slmgr.vbs.

If the server is running an evaluation version of Windows Server 2012 Standard or Windows Server 2012 Datacenter, you can convert it to a retail version as follows:

  1. If the server is a domain controller, you cannot convert it to a retail version. In this case, install an additional domain controller on a server that runs a retail version and remove AD DS from the domain controller that runs on the evaluation version. For more information, see http://technet.microsoft.com/en-us/library/hh994618.aspx.
  2. Read the license terms.
  3. From an elevated command prompt, determine the current edition name with the command DISM /online /Get-CurrentEdition. Make note of the edition ID, an abbreviated form of the edition name. Then run DISM /online /Set-Edition:<edition ID> /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula, providing the edition ID and a retail product key. The server will restart twice.

source:
http://technet.microsoft.com/en-us/library/dn502535.aspx
http://technet.microsoft.com/en-gb/library/jj574204.aspx

To install a client setup key, open an administrative command prompt on the client, type slmgr /ipk <setup key> and press ENTER.
Operating system edition KMS Client Setup Key
Windows 8.1 Professional GCRJD-8NW9H-F2CDX-CCM8D-9D6T9
Windows 8.1 Professional N HMCNV-VVBFX-7HMBH-CTY9B-B4FXY
Windows 8.1 Enterprise MHF9N-XY6XB-WVXMC-BTDCT-MKKG7
Windows 8.1 Enterprise N TT4HM-HN7YT-62K67-RGRQJ-JFFXW
Windows Server 2012 R2 Server Standard D2N9P-3P6X9-2R39C-7RTCD-MDVJX
Windows Server 2012 R2 Datacenter W3GGN-FT8W3-Y4M27-J84CP-Q3VJ9
Windows Server 2012 R2 Essentials KNC87-3J2TX-XB4WP-VCPJV-M4FWM

Operating system edition KMS Client Setup Key
Windows 8 Professional NG4HW-VH26C-733KW-K6F98-J8CK4
Windows 8 Professional N XCVCF-2NXM9-723PB-MHCB7-2RYQQ
Windows 8 Enterprise 32JNW-9KQ84-P47T8-D8GGY-CWCK7
Windows 8 Enterprise N JMNMF-RHW7P-DMY6X-RF3DR-X2BQT
Windows Server 2012 BN3D2-R7TKB-3YPBD-8DRP2-27GG4
Windows Server 2012 N 8N2M2-HWPGY-7PGT9-HGDD8-GVGGY
Windows Server 2012 Single Language 2WN2H-YGCQR-KFX6K-CD6TF-84YXQ
Windows Server 2012 Country Specific 4K36P-JN4VD-GDC6V-KDT89-DYFKP
Windows Server 2012 Server Standard XC9B7-NBPP2-83J2H-RHMBY-92BT4
Windows Server 2012 MultiPoint Standard HM7DN-YVMH3-46JC3-XYTG7-CYQJJ
Windows Server 2012 MultiPoint Premium XNH6W-2V9GX-RGJ4K-Y8X6F-QGJ2G
Windows Server 2012 Datacenter 48HP8-DN98B-MYWDG-T2DCC-8W83P

Operating system edition KMS Client Setup Key
Windows 7 Professional FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4
Windows 7 Professional N MRPKT-YTG23-K7D7T-X2JMM-QY7MG
Windows 7 Professional E W82YF-2Q76Y-63HXB-FGJG9-GF7QX
Windows 7 Enterprise 33PXH-7Y6KF-2VJC9-XBBR8-HVTHH
Windows 7 Enterprise N YDRBP-3D83W-TY26F-D46B2-XCKRJ
Windows 7 Enterprise E C29WB-22CC8-VJ326-GHFJW-H9DH4
Windows Server 2008 R2 Web 6TPJF-RBVHG-WBW2R-86QPH-6RTM4
Windows Server 2008 R2 HPC edition TT8MH-CG224-D3D7Q-498W2-9QCTX
Windows Server 2008 R2 Standard YC6KT-GKW9T-YTKYR-T4X34-R7VHC
Windows Server 2008 R2 Enterprise 489J6-VHDMP-X63PK-3K798-CPX3Y
Windows Server 2008 R2 Datacenter 74YFP-3QFB3-KQT8W-PMXWJ-7M648
Windows Server 2008 R2 for Itanium-based Systems GT63C-RJFQ3-4GMB6-BRFB9-CB83V

Operating system edition KMS Client Setup Key
Windows Vista Business YFKBB-PQJJV-G996G-VWGXY-2V3X8
Windows Vista Business N HMBQG-8H2RH-C77VX-27R82-VMQBT
Windows Vista Enterprise VKK3X-68KWM-X2YGT-QR4M6-4BWMV
Windows Vista Enterprise N VTC42-BM838-43QHV-84HX6-XJXKV
Windows Web Server 2008 WYR28-R7TFJ-3X2YQ-YCY4H-M249D
Windows Server 2008 Standard TM24T-X9RMF-VWXK6-X8JC9-BFGM2
Windows Server 2008 Standard without Hyper-V W7VD6-7JFBR-RX26B-YKQ3Y-6FFFJ
Windows Server 2008 Enterprise YQGMW-MPWTJ-34KDK-48M3W-X4Q6V
Windows Server 2008 Enterprise without Hyper-V 39BXF-X8Q23-P2WWT-38T2F-G3FPG
Windows Server 2008 HPC RCTX3-KWVHP-BR6TB-RB6DM-6X7HP
Windows Server 2008 Datacenter 7M67G-PC374-GR742-YH8V4-TCBY3
Windows Server 2008 Datacenter without Hyper-V 22XQ2-VRXRG-P8D42-K34TD-G3QQC
Windows Server 2008 for Itanium-Based Systems 4DWFP-JF3DJ-B7DTH-78FJB-PDRHK