Good Day to All, I was asked to create Contact Cards in Microsoft Exchange 2010, now this seems like an easy task in the EMC (Exchange Management Console) but when you have 2,000 contacts to create, EMC doesn’t seem much fun after all. Scripting power! I went to Microsoft Website and got some information on how to do it.

Contact-Card.csv

Contact-Card-csv

 

“New-MailContact -ExternalEmailAddress -Name [-Alias ] [-ArbitrationMailbox ] [-Confirm []] [-DisplayName ] [-DomainController ] [-ExternalDirectoryObjectId ] [-FirstName ] [-Initials ] [-LastName ] [-MacAttachmentFormat ] [-MessageBodyFormat ] [-MessageFormat ] [-ModeratedBy ] [-ModerationEnabled <$true | $false>] [-Organization ] [-OrganizationalUnit ] [-OverrideRecipientQuotas ] [-PrimarySmtpAddress ] [-SendModerationNotifications ] [-UsePreferMessageFormat <$true | $false>] [-WhatIf []]”

after a little fine tuning it ended up like this: “Import-CSV Contact-Card.csv | ForEach-Object {New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalEmailAddress -OrganizationalUnit $_.OrganizationalUnit -WhatIf}

Let’s break it down:

  1. Import-CSV Contact-Card.csv (where contact-card.csv is the file where we have the information we want to import.
  2. | ForEach-Object {                        (Since we’re doing batch it’s going to execute the command for each record)
  3. New-MailContact                          (Power Shell command to create a mail contact)
  4. -Name $_.Name                            (Exchange Field and Colum name match on csv)
  5. -ExternalEmailAddress $_.ExternalEmailAddress         (Exchange Filed and Column name match on csv)
  6. -OrganizationalUnit $_.OrganizationalUnit               (Exchange Filed and column name match on csv)

-WhatIf

Now the “-WhatIf” at the end of the command will show us a preview of the outcome, once were are ready to execute the command in Production, remove the -WhatIF

After a while, all 2000 contact cards were created…. Next o the Agenda… Script to Forward emails to the created contact cards…

 

 

 

I’ve recently found myself dealing with GPT protected partitions on HP Proliant Servers on which I’ve created Arrays using “Intelligent Provisioning App” to manage Storage. As with any Array configuration:

  1. Add the discs to the enclosure
  2. Create and array
  3. select the discs in the array
  4. Commit changes

and you are done, but recently after running that same procedure when I boot to Windows or VMware I am unable to use the provisioned array. On Windows when I go to the “Disk Manager” it appears as “GPT Protective Partition”

gpt-offline

gpt-online

I tried a couple of things on the GUI but nothing seemed to work, either because the control were grayed or would get errors. I decide to try it “Old school” and use “Diskpart”

gpt-diskpart

  1. Open “Command Prompt” as Administrator
  2. Enter command “Diskpart”
  3. Then command “List Disk”gpt-list-disk
  4. Then command “Select Disk” and the disk number, in this case I will select disk 2gpt-select-disk
  5. Now command “Clean” this command will wipe the partition on the disk.gpt-clean

The disk has been cleared of any “Protectiveness” and is ready to be configured. I executed command “List Disk” to show that the disc is free.gpt-unknown-disc

gpt-unknown-disc2

gpt-unkown-disc3

Now you can configure the disc to you hearts content. I hope this information was useful. Enjoy!

Automatic Upgrade of VMware Tools

Posted: February 28, 2017 in VMWARE

Have you ever tried to upgrade the VMware Tools on a VM and shown:

automaticupgradevmtools

  • Interactive Tools Upgrade
  • Automatic Tools Upgrade

I have stumbled upon this screen many times and most of the time chose the “Interactive Tools Upgrade” option where you login to the VM and install manually. After some research I found the commands on the VMware web page Enjoy!

Ever since System Center 2012 R2 Data Protection Manager started to support VMWare I’ve been trying to get it to work, I would end up getting stuck on the Certificate issue. A couple of days ago I saw this post:

implementingmicrosoftdpmhostlevelprotectionvmwarevms

To my benefit they solved the certificate issue, and I was able to implement the solution perfectly. A very special thanks  J.C. Hornbeck [MSFT] to for this Post.

Ever since System Center 2012 R2 Data Protection Manager started to support VMWare I’ve been trying to get it to work, I would end up getting stuck on the Certificate issue. A couple of days ago I saw this post:

implementingmicrosoftdpmhostlevelprotectionvmwarevms

To my benefit they solved the certificate issue, and I was able to implement the solution perfectly. A very special thanks  J.C. Hornbeck [MSFT] to for this Post.

A couple of days ago I received a call from a Colleague that was working on a VM with Windows Core 2008 R2 Domain Controller that had an issue and they needed to disable the network connection.

*To perform this task you must be logged into the console, no RDP.

  1. First Login to your server (must be able to elevate CMD or Power Shell with Admin Privileges)
  2. Execute command: “netsh interface ipv4 show interface” this will show you a list of all available ipv4 network adapters and their names.netsh-show-interface
  3. Here is the tricky part you need to know which interface you will disable. In this exercise I will disabled the Wi-Fi network adapter.  netsh-show-interface-show
  4. Now that we’ve picked our network adapter we will execute command to disabled it: “netsh interface set interface Wi-Fi disable”. netsh-disable-interface
  5. Now we will confirm that the adapter was disabled, by executing command: “netsh interface ipv4 show interface” .  As you can see on the image below the Wi-Fi adapter is no longer available, because it was disabled.netsh-show-interface-disabled-not-show
  6. Now we will enable it by executing the command: “netsh interface  set interface Wi-Fi enabled”. netsh-enable-interface
  7. Now we execute command: “netsh interface ipv4 show interface” and we can now see the Wi-Fi adapter is visible and enabled.netsh-show-interface-show

This command works on servers and workstations it’s not limited to Windows Core. Have a nice day and Enjoy.

I’ve been using this command for quite a while now, and today a colleague asked me how to install .net framework via PowerShell on Windows Server 2012 R2. After performing the installation I decided to post the command for everyone’s benefit.

I will use Deployment Image Service and management Tool (DISM)

DISM /Online /Enable-Feature /FeatureName:NetFX3 /Source:D:\sources\sxs

Where source= the letter of where the sources files for this feature is. (normally on your Microsoft Windows DVD or media used to Install Windows.

  1. Open PowerShellPowerShell
  2. Insert command DISM /Online… and press Enterdism-net-fx3

Now it’s installed, Enjoy!