TechOnTip Weblog

Run book for Technocrats

Windows Azure is currently performing an operation on this deployment that requires exclusive access.

Posted by Brajesh Panda on June 23, 2015

Here is an error I have encountered when trying to do some parallel operation on the same Cloud Service like Start-AzureVM or Stop-AzureVM –force.

ConflictError: Windows Azure is currently performing an operation with x-ms-requestid 2fdae353bba7bd40831b50eda73a2547 on this deployment that requires exclusive access.

This is a limitation in Azure right now. It happens due to some kind of locking at the backend on Cloud Services’s Network Provisioning.

Posted in Mix & Match | Leave a Comment »

When sending email with Send As Permission, store Sent Emails in Original Mailbox’s Sent Items folder

Posted by Brajesh Panda on June 16, 2015

By default they get stored in Sender’s Sent Item. Put this registry key and restart outlook.

DelegateSentItemsStyle Registry Value

To move sent messages to the correct sent items folder in Outlook 2010, 2007, or 2003, you need to enable a registry setting. (If you have the latest service pack for your version of Outlook, the hofix may be installed.)

Outlook 2013

Open the registry editor and browse to:

HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Preferences

DWORD: DelegateSentItemsStyle

Data Value: 1

Outlook 2010

In Outlook 2010, you need to have SP1 (or greater) installed. Open the registry editor and browse to:

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences

DWORD: DelegateSentItemsStyle

Data Value: 1

Outlook 2007

In Outlook 2007, install the June 30, 2009 hotfix, described in KB article 970944. Then open the registry editor and browse to

HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Outlook\Preferences

DWORD: DelegateSentItemsStyle

Data Value: 1

Outlook 2003

For Outlook 2003, you need this hotfix package. Once its installed, open the registry editor and browse to

HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Preferences

DWORD: DelegateSentItemsStyle

Data Value: 1

Posted in Mix & Match | Leave a Comment »

Pick a word from excel cell after/before a character

Posted by Brajesh Panda on May 29, 2015

Pick word(s) from excel after/before a character. Assuming b.panda@abc.com is in A1 cell.

Pick the domain name after @

abc.com =MID(A1,FIND(“@”,A1)+1,256)

Pick the user ID before @

b.panda =LEFT(A1,(FIND(“@”,A1,1)-1))

Posted in Mix & Match | Leave a Comment »

Windows Storage Performance Measurement with DiskSPD

Posted by Brajesh Panda on May 5, 2015

http://blogs.technet.com/b/josebda/archive/2014/10/13/diskspd-powershell-and-storage-performance-measuring-iops-throughput-and-latency-for-both-local-disks-and-smb-file-shares.aspx

Demo1: https://youtu.be/l2QBvNwJx64

Demo2: https://youtu.be/u8ZYhUjSUoI

Posted in Mix & Match | Leave a Comment »

Powershell: Networking Commands

Posted by Brajesh Panda on April 22, 2015

http://blogs.technet.com/b/josebda/archive/2015/04/18/windows-powershell-equivalents-for-common-networking-commands-ipconfig-ping-nslookup.aspx

http://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-3813-00-00-03-64-82-43/Windows-PowerShell-equivalents-for-common-networking-commands.pdf

My favorites

1. Test-NetConnection -ComputerName http://www.microsoft.com | Select -ExpandProperty PingReplyDetails | fl

2. Test-NetConnectionwww.microsoft.com–TraceRoute

3. Resolve-DnsName microsoft.com -Server 8.8.8.8 -Type MX

Posted in Mix & Match | Leave a Comment »

Get Public IP using Powershell

Posted by Brajesh Panda on April 3, 2015

http://www.telize.com/

Invoke-WebRequest -URI http://ip.telize.com

Invoke-WebRequest -URI http://www.telize.com/jsonip

Invoke-WebRequest -URI http://www.telize.com/geoip

Invoke-RestMethod -URI http://ip.telize.com

Invoke-RestMethod -URI http://www.telize.com/jsonip

Invoke-RestMethod -URI http://www.telize.com/geoip

Posted in Mix & Match | Leave a Comment »

Powershell# HTML Report with Multiple Tables

Posted by Brajesh Panda on January 8, 2015

## ConvertTo-Html –Fragment is used.

## Reference http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/01/working-with-html-fragments-and-files.aspx

## Execution ## save the script as html-fragment.ps1 and run as “.\html-fragment.ps1 > html-fragment.htm”

$computername Read-Host “Type computername”

function Get-CSInfo {

param($computername)

$os Get-WmiObject -Class Win32_OperatingSystem -ComputerName $computername

$cs =Get-WmiObject -Class Win32_ComputerSystem -ComputerName $computername

$bios =Get-WmiObject -Class Win32_BIOS -ComputerName $computername

$props = @{

‘ComputerName’=$computername

‘OS Version’=$os.version

‘OS Build’=$os.buildnumber

‘Service Pack’=$os.sevicepackmajorversion

‘RAM’=$cs.totalphysicalmemory

‘Processors’=$cs.numberofprocessors

‘BIOS Serial’=$bios.serialnumber }

$obj New-Object -TypeName PSObject -Property $props

Write-Output $obj

}

$frag1 Get-CSInfo –computername $computername ConvertTo-Html -As LIST -Fragment -PreContent ‘<h2>Computer Info</h2>’
Out-String

$frag2 Get-WmiObject -Class Win32_LogicalDisk -Filter ‘DriveType=3′ -ComputerName $computername Select DeviceID, Freespace, Size
ConvertTo-Html -Fragment -PreContent ‘<h2>Disk Info</h2>’ Out-String

$head @’

<style>

body { background-color:#dddddd;

font-family:Tahoma;

font-size:12pt; }

td, th { border:1px solid black;

border-collapse:collapse; }

th { color:white;

background-color:black; }

table, tr, td, th { padding: 2px; margin: 0px }

table { margin-left:50px; }

</style>

‘@

ConvertTo-HTML -head $head -PostContent $frag1,$frag2 -PreContent “<h1>Hardware Inventory for SERVER2</h1>”

# Output Screenshot



Posted in Mix & Match | Leave a Comment »

New Office 365 Admin Roles

Posted by Brajesh Panda on December 31, 2014

I think these are the new Office 365 (Azure AD) Admin roles. They are accessible thru powershell. Portal still shows old default ones. Yet to see any documents around them.

Name : Exchange Service Administrator

Description : Exchange Service Administrator.

Name : Partner Tier1 Support

Description : Allows ability to perform tier1 support tasks.

Name : Company Administrator

Description : Company Administrator role has full access to perform any operation in the company scope.

Name : Helpdesk Administrator

Description : Helpdesk Administrator has access to perform common helpdesk related tasks.

Name : Lync Service Administrator

Description : Lync Service Administrator.

Name : Directory Readers

Description : Allows access to various read only tasks in the directory.

Name : Directory Writers

Description : Allows access read tasks and a subset of write tasks in the directory.

Name : Billing Administrator

Description : Billing Administrator has access to perform common billing related tasks.

Name : Email Verified User Creator

Description : Allows creation of new email verified users.

Name : Partner Tier2 Support

Description : Allows ability to perform tier2 support tasks.

Name : AdHoc License Administrator

Description : Allows access manage AdHoc license.

Name : Service Support Administrator

Description : Service Support Administrator has access to perform common support tasks.

Name : SharePoint Service Administrator

Description : SharePoint Service Administrator.

Name : User Account Administrator

Description : User Account Administrator has access to perform common user management related tasks.

Posted in Mix & Match | Leave a Comment »

Backup Exec 2014 – Windows 2012 R2 Active Directory Backup

Posted by Brajesh Panda on December 19, 2014

I was setting up Backup Exec 2014 SP1 for Active Directory backup. Here are the components for System State backup in Windows 2012 R2 version of Active Directory.

Few Notes;

  • To take GRT (Granular Recover Technology) backup from a Windows 2012 R2 Domain Controller, Backup Server need to be Windows 2012 R2.

Posted in Mix & Match | Leave a Comment »

ADFS 2.0 Proxy Error Event ID 364 – Encountered error during federation passive request

Posted by Brajesh Panda on December 15, 2014

This error may be related to IIS Service, Application Pool or System Time. Make sure App pools are not stopped, system time is not beyond Kerberos skewing limit (5mins~). I have DMZ Workgroup machines synching time with underline ESXi server & that particular ESXi has wrong date & hours config. So fixing clock on ESXi and ADFS DMZ server, resolved my issue.

Thanks

Posted in Mix & Match | Leave a Comment »

Posted by Brajesh Panda on November 14, 2014

Applies to: System Center 2012 r2 Data Protection Manager

During installation it kept throwing below two errors in event log and installation get terminated abruptly.

##############

Application: SetupDpm.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.Reflection.TargetInvocationException

#############

Faulting application name: SetupDpm.exe, version: 4.2.1205.0, time stamp: 0x5226e038

Faulting module name: KERNELBASE.dll, version: 6.3.9600.17278, time stamp: 0x53eebf2e

Exception code: 0xe0434352

Fault offset: 0x000000000000606c

Faulting process id: 0xca4

Faulting application start time: 0x01d000630dc6415a

Faulting application path: C:\Users\BRAJES~1.BRA\AppData\Local\Temp\2\DPMC697.tmp\DPM2012\Setup\SetupDpm.exe

Faulting module path: C:\Windows\system32\KERNELBASE.dll

Report Id: 08f95133-6c59-11e4-80c5-000d3a103dc0

Faulting package full name:

Faulting package-relative application ID:

#############

 

After wasting 2 attempts, did bit research on google, found somebody mentioning IE doesn’t download the DPM from Volume Licensing Center properly. Here is the community article https://social.technet.microsoft.com/Forums/en-US/8f6a8a0d-c1ed-4f4d-b71d-7433070a771b/fresh-2012-r2-install-error-4378?forum=dpmsetup.

 

Earlier I have downloaded this ISO from our Volume Licensing Center using Web Browser method. Then tried with Google Browser and installation went thru properly

Funny part is this issue is reported in MS Community portal in early 2014. And it is going to end of 2014 but MS didn’t fix their volume licensing content distribution network binaries for this tool.

If you are facing below error during DPM, installation make sure uninstall & while re-installing, supply Domain NETBIOS name instead of Domain FQDN in Prerequisite Page.

I have no idea why Microsoft Dev folks did their coding like this. If it is required they could mention in the prerequisite page itself. I ended up wasting 2hrs for this.

Correct Credential Inputs by putting NETBIOS name

Posted in Mix & Match | Leave a Comment »

Setup cannot grant the “FQDN\Username” account access to DPM database

Posted by Brajesh Panda on November 14, 2014

Applies to: System Center 2012 r2 Data Protection Manager

If you are facing below error during DPM, installation make sure uninstall & while re-installing, supply Domain NETBIOS name instead of Domain FQDN in Prerequisite Page.

I have no idea why Microsoft Dev folks did their coding like this. If it is required they could mention in the prerequisite page itself. I ended up wasting 2hrs for this.

Correct Credential Inputs by putting NETBIOS name

Posted in Mix & Match | Leave a Comment »

Important Performance Counters

Posted by Brajesh Panda on October 27, 2014

http://blogs.technet.com/b/bulentozkir/archive/2014/02/14/top-10-most-important-performance-counters-for-windows-and-their-recommended-values.aspx

Posted in Mix & Match | Leave a Comment »

PowerShell Trick: Converting User Input to DATE

Posted by Brajesh Panda on August 17, 2014

$TD = Read-Host "Type TO Date in mm-dd-yyyy formart"

$Today = [DateTime]::Parse($TD)

http://dusan.kuzmanovic.net/2012/05/07/powershell-parsing-date-and-time/

PowerShell: Parsing Date and Time

in PowerShell

Parsing Date and Time

Parsing a date and/or time information is tricky because formatting depends on the regional settings. This is why PowerShell can convert date and time based on your regional settings or in a culture-neutral format. Let’s assume this date:

PS> $date = '1/6/2013'

If you convert this to a datetime type, PowerShell always uses the culture-neutral format (US format), regardless of your regional settings. The output is shown here on a German system:

PS> [DateTime]$date
Sonntag, 6. Januar 2013 00:00:00

To use your regional datetime format, use the Parse() method which is part of the DateTime type, like this:

PS> [DateTime]::Parse($date)
Samstag, 1. Juni 2013 00:00:00

Alternately, you can use Get-Date and the -date parameter:

PS> Get-Date -Date $date
Samstag, 1. Juni 2013 00:00:00

Parsing Custom DateTime Formats

Sometimes, date and time information may not conform to standards, and still you’d like to interpret that information correctly as date and time.

That’s when you can use ParseExact() provided by the DateTime type. Here’s an example:

PS> $timeinfo = '12 07 2012 18 02'

To tell PowerShell what piece of information belongs to which datetime part, you submit a template like this:

PS> $template = 'HH mm yyyy dd MM'

This template defines the custom format to specify hours first (HH), then minutes (mm), then the year (yyyy), the day (dd) and the month (MM).

Now let’s use the template to interpret the raw datetime information:

PS> $timeinfo = '12 07 2012 18 02'
PS> $template = 'HH mm yyyy dd MM'
PS> [DateTime]::ParseExact($timeinfo, $template, $null) 
Samstag, 18. Februar 2012 12:07:00

Voilá! To define patterns, here are the placeholders you can use (note that they are case-sensitive!):

d Day of month 1-31
dd Day of month 01-31
ddd Day of month as abbreviated weekday name
dddd Weekday name
h Hour from 1-12
H Hour from 1-24
hh Hour from 01-12
HH Hour from 01-24
m Minute from 0-59
mm Minute from 00-59
M Month from 1-12
MM Month from 01-12
MMM Abbreviated Month Name
MMMM Month name
s Seconds from 1-60
ss Seconds from 01-60
t A or P (for AM or PM)
tt AM or PM
yy Year as 2-digit
yyyy Year as 4-digit
z Timezone as one digit
zz Timezone as 2-digit
zzz Timezone

Parsing Extra Text

Using ParseExact() to parse custom datetime formats only works if the date and time information does not contain extra characters except whitespace.

To parse date and time information that has extra text in the middle of it, you must escape any ambiguous character. Here’s a sample:

PS> $raw = 'year 2012 and month 08'
PS> $pattern = '\year yyyy an\d \mon\t\h MM'
PS>
PS> [DateTime]::ParseExact($raw, $pattern, $null)

Note how in the pattern, each character that represents a date or time information is escaped. Other characters that are not placeholders for date or time information do not necessarily need to be escaped. If you are unsure, simply escape any character that is not meant to be a placeholder.

Posted in Mix & Match | Leave a Comment »

Enable External GalSync Contacts for Lync Address Book

Posted by Brajesh Panda on July 28, 2014

I found this article from http://uccexperts.com/enabling-ad-mail-contacts-for-lync/ & used the same procedures for my MIIS based GalSync Solution. Perfectly works. I just did one correction from the original article & added couple of lines here and there. Solution credit goes to original author. Cheers!!

Situation

While working in an environment with multiple Exchange 2010 forests where Forefront Identity Manager was used to realize a common global address list (GAL). Each forest also has its own Lync 2010 implementation without Enterprise voice. Primarily both environment has two different Lync environment with two different SIP Domain.

By default the Lync address book is automatically populated with all objects that have one of the following attributes filled in:

msRTCSIP-PrimaryUserAddress

telephoneNumber

homePhone

mobile

In case msRTCSIP-PrimaryUserAddress attribute is missing, Lync will not able to show presence info for the contact & it may just show a phone icon instead of a person icon/picture.

By default the FIM GalSync synchronizes all those attributes, except the msRTCSIP-PrimaryUserAddress. This caused contacts in the remote forest to appear in the address book with a telephone icon:


This situation caused confusion for our users because they expect the Lync client to work for Instant Messaging with Lync users in the remote forests. When they try to start an IM session with a remote forest user Outlook starts and will created a new e-mail message.

Note: If you see phone icon for those users, make sure to test Federation using their SIP Address directly rather than, default AD Objects. You can add a Lync object to Outlook address book & stamp SIP Address manually & try to test federation.

You can also try out exporting & manually adding/updating this attribute. That should work too. But that will be manual process for future updates too. Using below procedure you can configure GalSync Management Agents to replicate this Lync Attribute too.

Solution

The solution is to include the AD attribute “msRTCSIP-PrimaryUserAddress” in the FIM address list synchronization.

Lab Setup

The overview below depicts my lab setup:


The lab is running Exchange 2010, Lync 2010 and FIM 2010 in a Windows 2008 R2 Active Directory. My environment is MIIS GALSync.

Scope

The scope of this procedure is to add the “msRTCSIP-PrimaryUserAddress” in the local forest to the contact in the remote forest by using the built-in Galsync management agents of FIM 2010. This procedure does not cover the implementation of the Galsync itself.

Presence and instant messaging to the remote forest will only be available when you have Lync Edge servers and federation in place. This procedure focuses on changing the AD attributes so that Lync recognizes the contact as a lync-enabled contact.

PROCEDURE

Step 1: Extend the metaverse schema

  1. Start the Synchronization Service Manager and click Metaverse Designer.
  2. Select person in the Object types pane
  3. Click Add Attribute in the Actions pane

  4. Click New Attribute in the “Add Attribute to object type” windows

  5. Enter the following information in the “New Attribute” windows:

Attribute name

msRTCSIP-PrimaryUserAddress

Attribute type

String (indexable)

Mapping Type

Direct

Multi-valued

Clear check box

Indexed

Clear check box


  1. Click OK
  2. Click OK

Step 2: Configure Management Agent of corporate.nl

  • Start the FIM Synchronization Service Manager Console and select “Management Agents
  • Right click the Management Agent you want to modify and select Properties.
  • Go to the “Select Attributes“section
  • Check the Show All box and select the attribute “msRTCSIP-PrimaryUserAddress“, click OK


  • Return to the properties of the Management Agent and select the section “Configure Attribute Flow
  • Configure this section according to the following table:

Data source object type

user

Metaverse object type

person

Mapping Type

Direct

Flow Direction

Export (allow nulls)

Data source attribute

msRTCSIP-PrimaryUserAddress

Metaverse attribute

msRTCSIP-PrimaryUserAddress


  • Click New
  • Verify this modification by collapsing the following header:

  • Check if the following rule is added:

Step 3: Import modification to the metaverse

  • Right click the management agent you just modified and select Properties
  • Select Run  and do a Full Import and Full Synchronization

Step 4: Verify attribute import

  • Start the FIM Synchronization Service Manager Console and select “Metaverse Search
  • Click “Add clause
  • Enter the following clause:

  • Click “Search
  • In the “Search Results” pane, right click the user with displayname corporate01 and select Properties
  • Confirm that the attribute “msRTCSIP-PrimaryUserAddress” contains a value

  • Click Close

Step 5: Configure Management Agent of company.nl

  • Start the FIM Synchronization Service Manager Console and select “Management Agents
  • Right click the Management Agent you want to modify and select Properties.
  • Go to the “Select Attributes“section
  • Check the Show All box and select the attribute “msRTCSIP-PrimaryUserAddress”, click OK

  • Return to the properties of the Management Agent and select the section “Configure Attribute Flow
  • Configure this section according to the following table:
Data source object type contact
Metaverse object type person
Mapping Type Direct
Flow Direction Export (allow nulls)
Data source attribute msRTCSIP-PrimaryUserAddress
Metaverse attribute msRTCSIP-PrimaryUserAddress


  • Click New
  • Verify this modification by collapsing the following header:

  • Check if the following rule is added:

Step 6: Export modification to the remote forest

  • Right click the management agent you just modified and select Properties
  • Select Run  and do an Full Import and Full Synchronization
  • Right click the management agent you just modified and select Properties
  • Select Run  and do an Export

Step 7: Verify attributes in remote forest

  • Start Active Directory Users And Computers and enable the Advanced features
  • Go to the OU where the FIM Galsync creates the contacts
  • Double click the contact “corporate01″ and go the the Attribute Editor

  • Confirm that the attribute “msRTCSIP-PrimaryUserAddress” contains a value.

What does it look like in the Lync client ?

If I log in as  user company01 and we can see the following result in the Lync client:

In the screenshot above the users in the remote forest have a status of “Presence Unknown”. This is because I did not have Edge servers implemented in my test environment.

If you have implemented Lync Edge servers and you have your Lync federations between both organizations in place, the presence will be shown for the contacts as if they were users in the local Lync organization.

Posted in Mix & Match | 7 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 87 other followers

%d bloggers like this: