Keith Smith - My Blog
Powershell add A resource records to DNSTuesday, September 18, 2018 - Posted by Keith A. Smith, in Microsoft
I wanted to take sometime to write up a
quick how to for adding A resource records into a windows DNS server via powershell. In my
case this is something that must take place before you use a product
like observium because it requires all the network devices to have A
resource record in DNS. To create these records it's best to do it in
via scripting, in this case powershell using the below 3 cmdlets:
Add-DnsServerResourceRecordA Add-DnsServerResourceRecord Get-DnsServerResourceRecord
For a single entry you can use the following in powershell
Add-DnsServerResourceRecordA -Name Device1 -IPv4Address 192.168.9.10 -ZoneName yourdnszonename.net-ComputerName ADServername The command is broken down below: Add-DnsserverResourceRecordA = This is the CMDLET used to add A resource record only -Name = -Name of the A resource record -IPv4Address = Is the ip address of the resource -ZoneName = is the zonename you are adding your record to -ComputerName = -ComputerName is the name for Dns Server -CreatePtr = This is optional, if you want to create ptr (Reverse lookup record entry).
Note: To view the changes in DNS manager you will need to right click and refresh the zone, if you have already opened DNS manager. For a multiple entry situation you would need to do the following in powershell
To add multiple resource record from csv file, Here is below step by step tutorial. I have saved excel file as csv. (and it is saved in c:\temp location) Open up a spreadsheet program and name the first column Name (this is the name of the device) the next column should be named IPv4Address (here you would put the static ip of the device. You would need add all your devices in the aforementioned columns. Once your csv file is completed fire up powershell and run the following (modified the below path as needed)
Import-Csv driveletter:\folder\DNSEntries.csv | ForEach-Object { Add-DnsServerResourceRecordA -Name $_.Name -IPv4Address $_.IPv4Address -ZoneName yourdnszonename.net -ComputerName ADServername}
Note: To view the changes in DNS manager you will need to right click and refresh the zone, if you have already opened DNS manager.
-End |
![]() Tweet |
Outlook google calendar syncWednesday, July 18, 2018 - Posted by Keith A.Smith, in Microsoft
The Gmail web UI hasn’t changed much over the years regarding the way it looks and it still is lacking features. I found that most prefer to use a mail client instead to send/receive mail which is a pro but the con to this method is synchronizing calendar items, insert outlook google calendar sync for the win.
This solution is open source and works great, it can sync calendar items from your outlook calendar to your Gmail calendar or from your Gmail calendar to your outlook calendar, or it can do bi-direction sync which is most useful for those who bounce between the Gmail web UI and the outlook client. If you have Gmail and you use the outlook client I recommend installing this, don’t forget to enable the auto sync on it.
- End
|
![]() Tweet |
Observium - Rename existing devicesTuesday, July 17, 2018 - Posted by Keith A. Smith, in LinuxObservium is one of my go-to open source solutions for network monitoring, I figured I'd share a recent challenge I encountered. I found myself needing to change a few device hostnames in observium, and it can be a bit tricky since it can't be done via the UI. This task can be done successfully from the command-line by running the following: Shell cd /opt/observium/ and execute php rename_device.php old_device_name new_device_name Once you're done renaming your device you should force snmp discovery and the poller to run: Shell execute the following: php discovery.php -h all php poller.php -h all Once the above process is completed you should see your devices renamed in the UI.
-End |
![]() Tweet |
Active Directory Topology DiagrammerThursday, May 17, 2018 - Posted by Keith A. Smith, in Automation, Microsoft
Overview
Have you ever wondered…what does our Active Directory structure really look like? Do you want to automate the process of creating a diagram of Active Directory OU? As described on Microsoft’s download page for Active Directory Topology Diagrammer: The Microsoft Active Directory Topology Diagrammer reads an Active Directory configuration using LDAP, and then automatically generates a Visio diagram of your Active Directory and /or your Exchange Server topology. The diagrams may include domains, sites, servers, organizational units, DFS-R, administrative groups, routing groups and connectors and can be changed manually in Visio if needed. If you need to create Active Directory drawings for Visio, then this is the utility that is going to do it for you in really detailed fashion.
You Don’t Create the Drawings From Inside Visio After downloading the AD Diagrammer, you run it independently. You actually don’t even need Visio on your machine unless you want to edit the diagrams. If you just want to view them, you can just use the Visio Viewer, or upload them to a SharePoint site with Visio Services enabled.
Finally, you can choose to diagram the servers in the AD Structure:
Options for the Server diagramming include whether to include the OS version that the server is running and whether to include the fully qualified domain name. If you’re mapping multiple domains, it may be helpful to color code them based on what domain they’re in.
Set the File Output Options and You’re Ready To Diagram
In the Options menu, you can modify the location of the diagrams. You can specify different locations for each file that’s going to be created for you.
There are also log files that are created for the AD Export data and any debug info for the Application.
This is a really awesome tool and I hope you find it useful. Happy AD Topo Diagramming
-End |
![]() Tweet |
An error occurred while consolidating disks: One or more disks busyThursday, March 29, 2018 - Posted by Keith A. Smith, in VMware
We've all encountered the dreaded error "An error occurred while consolidating disks: One or more disks are busy" when trying to consolidate virtual machines in vmware.
To resolve this vmware has published articles like http://https://kb.vmware.com/s/article/2150414 but for me I found that simply shutting down the VM and the vCenter server seems to allow the consolidation process to complete when connecting to the hosts box directly via the vcenter client. I figured I take a few minutes to write this up since it may help someone else.
-End |
![]() Tweet |