Month: December 2016

Microsoft Windows PowerShell – Delete DNS A Record

Scripting is a great way to make yourself more efficient as an Information Technology (IT) professional. With that being said, the Microsoft Windows PowerShell script below may be used to automate the deletion of a domain name system (DNS) A record.

<#
.SYNOPSIS
This script will automate the process of deleting a DNS A record.
.DESCRIPTION
This script will automate the process of deleting a DNS A record.
.EXAMPLE
Remove-DnsServerResourceRecord -ZoneName “noelalvarez.net” -RRType “A” -Name “www”.
.AUTHOR
Written by Noel Enrique Alvarez on Thursday, December 22, 2016.
#>

#Request the hostname of the server
$HOSTNAME = Read-Host “What is the hostname of the server?”

#Delete the DNS A record
Remove-DnsServerResourceRecord -ZoneName “noelalvarez.net” -RRType “A” -Name “$HOSTNAME” -Force

#End of script


VMware vSphere 6 – Create a Template

VMware includes a great solution, templates, for consistent virtual machine deployments. A template is essentially a master image of a virtual machine that typically includes a guest operating system and applications. Using templates allows you to deploy virtual machines with a consistent configuration. Additionally, below is a step list of steps for creating a template.

  • Install the Microsoft Windows 2012 R2 operating system
  • Install VMware Tools
  • Install Windows Updates
  • Run sysprep (C:\Windows\System32\Sysprep\sysprep.exe)
    • System Cleanup Action: Enter System Out-of-Box Experience (OOBE)
    • Generalize
    • Shutdown Options: Shutdown
  • Right click the virtual machine and select Convert to Template….

 


Windows Server Update Services – Basic Troubleshooting

Windows Server Update Services (WSUS) is a Microsoft solution for applying updates to Windows hosts on a network. While excellent planning an implementation may lead to a successful deployment there may be times when troubleshooting failed updates may be necessary. Below is a list of three basic troubleshooting steps.

  1. Review the WindowsUpdate.log file (C:\Windows\WindowsUpdate.log).
  2. Confirm that your Software Update Point (SUP) is correctly registered in the registry (HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate).
  3. Verify that the client can connect to the WSUS website (http://server.fqdn:port/SimpleAuthWebService/SimpleAuth.asmx).

Microsoft Exchange Server 2010 – Access the Exchange Administration Center (EAC)

After installing Microsoft Exchange Server 2010 you may access the Exchange Administration Center (EAC) using the https://localhost/ecp (from the server that is hosting the application) or https://<servername>/ecp (in this example it is https://exchange01.root.sysadmin.net/ecp).

1. Enter https://exchange01.root.sysadmin.net.ecp in the web browser url address bar. Click Continue to this website (not recommended).

01

2. Enter your authentication credentials then click Sign in.

02

3. Select the appropriate Language: and Time zone: settings then click OK.

03

4. Now you are logged in.

04

 

This completes the process to login to the Exchange Administration Center (EAC).


Dell – Get Service Tag Remotely

You may use the Microsoft Windows PowerShell script below to get the service tag of a Dell server, remotely.

<#
.SYNOPSIS
This script will automate the process of determining the service tag of a Dell server.
.DESCRIPTION
This script will query the server you specificy for it’s service tag.
.EXAMPLE
wmic /user:administrator /node:hostname bios get serialnumber.
.AUTHOR
Written by Noel Enrique Alvarez on Monday, December 05, 2016.
#>

#Request the domain name
$– USERNAME = Read-Host “What is the username of the administrator account?”

#Request the hostname of the server
$HOSTNAME = Read-Host “What is hostname of the server?”

#Get the service tag
wmic /user:$– USERNAME /node:$HOSTNAME bios get serialnumber

#End of script


Microsoft Windows PowerShell – Add a Domain User to a Group

You may use the Microsoft Windows PowerShell script below to remotely add a domain user to the specified group of the server you choose.

<#
.SYNOPSIS
This script will add a domain user to a group on a server.
.DESCRIPTION
This script will automate the process of adding a domain user to a group on a server.
.EXAMPLE
N/A.
.AUTHOR
Modified by Noel Enrique Alvarez on Friday, December 02, 2016.
#>

#Request the domain name
$DOMAIN = Read-Host “What is the domain?”

#Request the username
$– USERNAME = Read-Host “What is the username?”

#Request the hostname of the server
$SERVER = Read-Host “What is the hostname of the server?”

#Request the name of the group
$GROUP = Read-Host “What is the name of the group (i.e. Administrators)?”

([ADSI]”WinNT://$SERVER/$GROUP,group”).psbase.Invoke(“Add”,([ADSI]”WinNT://$DOMAIN/$– USERNAME”).path)