Monday, August 22, 2016

Get the value of a NoteProperty

You get to a NoteProperty by putting the entire note property in quotes like this:

(Get-SCOMClass -Name 'Microsoft.Windows.Computer'|Get-SCOMClassInstance)[0].'[Microsoft.Windows.Computer].PrincipalName'.Value

I had a hard time Googling how-to get to the value of NoteProperty fields on (OpsMgr) powershell objects until I found Steve's blog:

The simple trick I needed was to put the entire property in quotes.

Friday, September 25, 2015

Find files with same content using powershell

Today I needed to find files with identical content within a folder. Inspired by a few examples out there I came up with this (will Work from ps 4.0):

Get-ChildItem|where { ! $_.PSIsContainer }|
Get-FileHash|Group-Object Hash|where{$_.Count -gt 1}|
foreach{write-host "-----------------------------------------------";$_.Group.Path}

Once again, the power of powershell proved itself, as I managed to get it right in less that 10 minutes

For reference:


Monday, August 3, 2015

BizTalk group SCOM discovery not working

The BizTalk group SCOM discovery will not work until a stopped first server is removed from the group unless you do the following the Computer Name property override for the discovery.

Go the SCOM Authoring pane, search for the object discovery called BizTalk Group Discovery and override this for a specific object of the BizTalk run-time role (select one of the running servers). 

Now, what exactly do you have to write as Override Value:

To be sure, execute the following SQL query against the BizTalk management database of the group:

select * from adm_Server srv with (NoLock) order by srv.Id asc

From the Name column of query result copy the exact server name (casing and all) matching the BizTalk Run-Time Role object for which you chose to override the discovery. 

Friday, May 8, 2015

Microsoft.BizTalk.ExplorerOM.PermissionException: Error in the application after upgrade to BizTalk Server 2013 R2

After upgrading to BizTalk Server 2013 R2 certain (service) accounts get this exception:

Microsoft.BizTalk.ExplorerOM.PermissionException: Error in the application

Running the BizTalk Server Administration Console using the same account you'll get this similar error:

Failed to load Group […BizTalkMgmtDb] data providers. (Microsoft.BizTalk.Administration.SnapIn)

Connecting to ExplorerOM failed. (Microsoft.BizTalk.SnapIn.Framework)

Error in the application. (Microsoft.BizTalk.ExplorerOM)

We saw the exact same problem back in 2013 when we installed BizTalk Server 2013. I've described a fix for the issue in this post:

Thursday, September 18, 2014

This property cannot be currently changed. Please unelist the send port before changing this property.

Yesterday we ran into this error while importing a BizTalk binding file for an existing application:

Failed to update binding information. (mscorlib)

This property cannot be currently changed.  Please unelist the send port before changing this property. (Microsoft.BizTalk.ExplorerOM)

(The typo is Microsoft's, not mine)

That is the same error you get when trying to change an enlisted send port to (or from) ordered delivery.

Our situation was weird though, as the existing application had been created using the exact same binding file. Meaning, we have a binding file that can be imported once, but not twice.

The reason for this is rather subtle. Created by a hand the binding file configuring the ordered send port looked somewhat like this:

<SendPort ...>

Note how ordered delivery of the primary transport is set to false while ordered delivery is set to true on the send port itself. This will create a send port with an ordered primary transport on first import, but a second import will make the import fail with the error above.

The solution is to keep the OrderedDelivery tag of the send port in sync with that of the Primary transport

<SendPort ...>

This is however not very clear from the documentation:

Finally a word of caution: import binding can change a send ports delivery status to and from ordered delivery without first having to unenlist the port. I'm investigate whether this is safe or not:

Safe to change sendport delivery status to and from ordered delivery using import binding?

Wednesday, September 3, 2014

How-to move BizTalk databases

Even though Microsoft has provided scripts to help moving BizTalk databases it's still a cumbersome.

For reference please see:
I've created the script below to ease the pain after database restore. The script will:
  1. create the config file used by UpdateDatabase.vbs and UpdateRegistry.vbs
  2. stop all running host instances by stopping ESSO
  3. update the BizTalk databases content
  4. update the BizTalk frontend registry values
  5. start ESSO
  6. start all previously running host instances
Please note, the script will only work in the simple case of no BAM and all databases residing on one database server only.

Wednesday, July 9, 2014

Check-in and undo pending changes when having several Visual Studio solutions in the same folder could have side effects

In my current project we have a number of Visual Studio projects distributed into several solutions. In our case all solutions files are located in the same (root) folder.

Now, if I choose to check in pending changes at the solution level in one solution, the included changes will unexpectedly include changes for all solutions in the root folder.

Similarly, and even worse, if I choose to undo the pending changes at the solution level in one solution, the list of changes to be undone will actually include changes made to the other solutions as well.

The risk of checking in changes from other solutions by mistake, can be mitigated easily by selecting the View Option: Show Solution Changes:

However, there seems to be not similar easy way to avoid undoing pending changes in other solutions when undoing pending changes in one solution. Instead I sort by folder name and exclude the changes I want to keep one by one: