Author: Noel Alvarez

Microsoft Windows Server 2008 R2 – Extend a Partition

You may use the following commands to extend a partition in Windows Server 2008 R2.

  1. Open a command prompt
  2. diskpart
  3. list volume
  4. select volume (volume ID)
  5. extend (size) (if no size specified, it’s expanded to the maximum)

Microsoft Windows PowerShell – Starting a Service on a Remote Server

The following (2) commands may be used to verify the status of a service on a remote computer as well as start the service on the remote computer. Additionally, you may substitute the name value with the displayname value.

 

get-service -computername <<<INSERT>>> | where-object {$_.name -eq “<<<INSERT>>>”}

get-service -name <<<INSERT>>> -computername <<<INSERT>>> | set-service -status running


Cisco – Delete All VLANs

You may use the following global configuration command to remove VLANs 2-1001 on a Cisco switch. This range is chosen because VLANS 1, 1002, 1003, 1004 and 1005 cannot be removed from a Cisco switch. This command may be used when a switch’s configuration needs to be deleted, in addition to erase startup-config, for a new deployment.

switch-01(config)#no vlan 2-1001


Microsoft Windows PowerShell – Command Reference

The list below contains a reference list of Microsoft Windows PowerShell commands.

  • Networking
    • List Network Adapters
      • Get-NetAdapter

Microsoft Windows Server 2012 R2 – Network Time Protocol Configuration

You may use the following Microsoft Windows PowerShell commands, as an administrator, to configure the network time protocol (NTP) servers for Windows Server 2012 R2 and sync a Windows client, such as Microsoft Windows 7, to the server. This example is using the well known NTP servers from the NTP Pool Project.

  • Server Configuration:
    • w32tm /config /manualpeerlist:”0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org” /syncfromflags:MANUAL
    • Stop-Service w32time
    • Start-Service w32time
  • Client Configuration:
    • w32tm /resync

VMware ESXi 5.5 – Scripted Installation

The script below is a sample script that may be used to automate the installation of VMware ESXi 5.5. For more information click here.

#
# Sample scripted installation file
#
# Accept the VMware End User License Agreement
vmaccepteula
# Set the root password for the DCUI and Tech Support Mode
rootpw mypassword
# The install media is in the CD-ROM drive
install –firstdisk –overwritevmfs
# Set the network to DHCP on the first network adapater
network –bootproto=dhcp –device=vmnic0
# A sample post-install script
%post –interpreter=python –ignorefailure=true
import time
stampFile = open(‘/finished.stamp’, mode=’w’)
stampFile.write( time.asctime() )


Microsoft Group Policy Object – Disable Default Domain Policy Password Policy

You may use the following method to disable the Password Policy settings in the Default Domain Policy. I do not recommend this for a production network, which should use a password policy, but it may be used in a home lab.

GPO Path: Computer Configuration/Policies/Windows Settings/Security Settings/Account Policies/Password Policy

GPO Settings: Enforce Password History/0

GPO Settings: Maximum Password Age/0

GPO Settings: Minimum Password Age/0

GPO Settings: Minimum Password Length/0

GPO Settings: Password must meet complexity requirements/Disabled


VMware Workstation 11 – Accessing the BIOS

You may add the following line to the virtual machine’s configuration file (.vmx) to provide a (5) second delay from the initial post screen to enter the virtual machines BIOS settings.

 

bios.bootDelay = “5000”

 

Enjoy!


Cisco – Port Security

You may use the following method to configure port security on a Cisco switch. Additionally, this configuration will not use the switchport port-security violation {protect | restrict | shutdown} command in order to accept the default action of shutdown.

1. Verify the existing configuration, if any, exists on the switch port.

01

 

 

2. Navigate to the interface configuration prompt of the interface you would like to configure.

02

 

 

 

3. Enter the switchport mode access command.

03

 

 

 

 

4. Enter the switchport port-security command to enable port security.

04

 

 

 

 

5. Enter the switchport port-security maximum x command to define the maximum number of MAC addresses to define where x is the number of MAC address to define. The default value is to accept a maximum of (1) MAC address. In this example the maximum number is (2).

05

 

 

 

 

6. Enter the switchport port-security mac-address sticky to allow the switch to dynamically learn the first (2) MAC addresses.

06

 

 

 

 

 

7. Verify the port security configuration using the show running-config command or the show port-security interface FastEthernet 0/1 command.

07-1

 

 

 

07-2

 

 

 

 

 

 

 

 

 

Enjoy!


VMware ESXi 5.5 – Domain Name System (DNS) and Routing Configuration

You may use the following method to configure the Domain Name System (DNS) server(s) for a VMware ESXi 5.5 host.

1. Connect to the VMware ESXi host using the VMware vSphere Client.

01

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2. In the VMware vSphere Client 5.5 navigate to Configuration > DNS and Routing and click Properties….

02

3. In the DNS and Routing Configuration dialog box on the DNS Configuration tab enter all of the configuration information for the host.

03

 

 

 

 

 

 

 

 

 

 

 

 

4. In the DNS and Routing Configuration dialog box on the Routing tab verify that the Default gateway: is configured correctly then click OK.

04

 

 

 

 

 

 

 

 

 

 

 

 

5. In the Gateway Not Specified dialog box you may safely click Yes if you are not using IPv6.

05

 

 

 

 

 

 

6. The DNS and Routing page should now display all of the correct settings.

06

Enjoy!