Friday, September 30, 2011

How to Find Your Own IP

We all know how to use the command line to find our IP addresses, right? “ipconfig”- it’s that easy! Well, especially with newer versions of Windows or for anyone who installs networking or virtualization software, ipconfig’s output can get… verbose.

There is a command that involves a little more typing but whose output is much cleaner:

netsh interface ipv4 show addresses

This can be shortened to “netsh int ipv4 sho ad” as netsh will figure out what you mean as long as you type enough text for it to eliminate any other possibilities.

For me, the output of this command is:

C:\Users\Nathan>netsh int ipv4 sho ad

Configuration for interface "Wifi MS Miniport"
    DHCP enabled:                         Yes
    InterfaceMetric:                      25

Configuration for interface "Local Area Connection"
    DHCP enabled:                         Yes
    InterfaceMetric:                      10

Configuration for interface "Wireless Network Connection"
    DHCP enabled:                         Yes
    IP Address:                           169.254.17.139
    Subnet Prefix:                        169.254.0.0/16 (mask 255.255.0.0)
    InterfaceMetric:                      25

Configuration for interface "Bluetooth Network Connection"
    DHCP enabled:                         Yes
    InterfaceMetric:                      40

Configuration for interface "VirtualBox Host-Only Network"
    DHCP enabled:                         No
    IP Address:                           169.254.121.157
    Subnet Prefix:                        169.254.0.0/16 (mask 255.255.0.0)
    InterfaceMetric:                      20

Configuration for interface "Loopback Pseudo-Interface 1"
    DHCP enabled:                         No
    IP Address:                           127.0.0.1
    Subnet Prefix:                        127.0.0.0/8 (mask 255.0.0.0)
    InterfaceMetric:                      50

Wednesday, August 31, 2011

Stuck On the Domain!

Today, I had a problem where one of my Server Core machines would not leave the domain. I was having other issues and needed to get the machine off of the domain, but throughout my troubleshooting, I got a number of different errors. The machine just wouldn’t leave the domain!

Or at least not until I found the netdom.exe utility. This tool can be used to perform a number of different domain administration tasks but for my purposes, I was interested in the following:

netdom remove <hostname> /domain:<domainname> /force

I ran this command on the offending server itself. The “/force” switch made all the difference in the world and after a short wait, my server was domain-free.

Tuesday, August 23, 2011

Scary Error Messages

When my Hyper-V cluster had a host go down and I went to log into its Virtual Console (which I happened to have on my screen already), I got a scary error message:

 

image

 

It isn’t TRUE, but it sure is scary. It hasn’t been deleted, it’s been moved!

Friday, August 19, 2011

F5 Big-IP: URI Caching Not Working

I’m in the midst of configuring an F5 Big-IP 1600 for load balancing, single sign on and some performance improvements. I was having a problem where a SharePoint site wasn’t running any faster in spite of the fact that I was doing URI caching AND WebAccelerator.

 

After disabling WebAccelerator, URI caching started to work. I still don’t understand why this is.

Thursday, August 18, 2011

SharePoint 2010: How to Give Yourself Access

Today, I was asked to change some user permissions on a site. I was a domain admin but had no other privileges that would help me along the way. Importantly, this meant I didn’t have the permissions needed to change some user permissions on the site.

How did I get said permissions?

I changed the password on the account of someone who DID have permissions and used that account. Lame, I know. I didn’t really do much troubleshooting, either, but this was a quick solution.

UPDATE: This looks a bit more proper. I haven’t read through it, but it seems relevant.

http://blog.falchionconsulting.com/index.php/2007/09/add-site-administrator/

UPDATE 2: With much thanks to the above link:

IF:

- You have access to a SharePoint Farm’s Central Administration console

AND:

- You do NOT have permissions on a given site but NEED such permissions

The SOLUTION is:

- Application Management, Site Collections, Manage Site Collection Administrators

- Add yourself as either the primary or secondary site administrator

There is no way to simply grant yourself fine-grained permissions- you’ve got to make yourself one of “The” administrators of the site, and you can only have two such administrators.

Wednesday, March 9, 2011

VMware ESX 4.1 Datastores Have a Minimum Size!

The minimum size of a datastore in ESX 4.1 is 1.2 GB.

Friday, September 3, 2010

Bulk Contact Creation in Exchange With PowerShell and CSV Files

I recently ran into a situation where someone wanted to have Distribution Lists in Exchange that were populated with email addresses of people outside our company. Of course, this meant that each recipient needed its own Contact object in Active Directory. But how to create the dozens of AD objects I'd need to fulfill this simple request?

Luckily, there's a cmdlet for that. Create a CSV file where the first line reads as follows:

Name,ExternalEmailAddress,OrganizationalUnit



Subsequent lines should look like this:

John Doe,SMTP:johnny@example.com,contoso.info/In/This/OU
Jane Doe,SMTP:janey@example.com,contoso.info/In/That/OU



The finished product should look like this:

Name,ExternalEmailAddress,OrganizationalUnit
John Doe,SMTP:johnny@example.com,contoso.info/In/This/OU
Jane Doe,SMTP:janey@example.com,contoso.info/In/That/OU



(Of course, add as many entries as you like)

Got that in a CSV file? Good. Save it somewhere and fire up PowerShell on your Exchange server. Then, run the following:

import-csv Book1.csv | foreach {New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit $_.OrganizationalUnit -whatif}



Edit the file name as needed. I threw in the "-whatif" part so that you can see exactly what the command will do before actually doing it. As long as you like the results, you can take out the "-whatif" to go ahead and create the objects.