Entries by Remko Weijnen

Oracle Client install fails with NullPointerException

Today I was asked to assist in troubleshooting an Oracle Client (10g) installation. The installation halted very quickly with a java.lang.NullPointerException:   Remko WeijnenWas once an enthusiastic PepperByte employee but is now working elsewhere. His blogs are still valuable to us and we hope to you too.

Settings NTFS Permissions by SID in PowerShell

I am currently creating a PowerShell script that creates a user with all needed Active Directory attributes, Exchange mailbox, (TS) Home- and Profile directories and so on. In such a script you can easily get failures because of Active Directory replication. Remko WeijnenWas once an enthusiastic PepperByte employee but is now working elsewhere. His blogs […]

Check if a useraccount exists with PowerShell

Function below can be used to check if a given Username exists in Active Directory: function UserExists([string]$Username) { $strFilter = “(&(objectCategory=person)(sAMAccountName=$Username))” $objDomain = New-Object System.DirectoryServices.DirectoryEntry $objSearcher = New-Object System.DirectoryServices.DirectorySearcher $objSearcher.SearchRoot = $objDomain $objSearcher.PageSize = 1000 $objSearcher.Filter = $strFilter $objSearcher.SearchScope = “Subtree” $colResults = $objSearcher.FindAll() return [bool]($colResults -ne $null) } Remko WeijnenWas once an enthusiastic PepperByte […]

VBScript vs PowerShell

I am converting an old VBScript to PowerShell and it’s very nice to see how many lines of code in VBS can be written in one line of (much better readable) code in PowerShell. Remko WeijnenWas once an enthusiastic PepperByte employee but is now working elsewhere. His blogs are still valuable to us and we […]

Cannot achieve Exchange Server authentication

I was testing outgoing mail flow in my new Exchange 2010 setup, which should go from the CAS Servers to the Edge server in the DMZ. After configuring the Edge subscription I noticed that outgoing mails got stuck in the queue with the following error: “451 4.4.0 Primary target IP address responded with: “451 5.7.3 […]

Get smallest Exchange Database in PowerShell

I needed to adapt some scripts that create a user with mailbox for Exchange 2010. The existing scripts had a hardcoded database for new mailboxes. I wanted the mailbox to be created in the smallest database, but how do we determine this? For Exchange 2010 this is fairly easy using PowerShell: # Add Exchange Snapins […]

Set Exchange Product Key with PowerShell

By default Exchange 2007 and 2010 are installed in Trial mode so before going into production you need to enter the Product Key. The Exchange Management Console will warn you if one or more servers are still in trial mode: Remko WeijnenWas once an enthusiastic PepperByte employee but is now working elsewhere. His blogs are […]

PowerShell script to set Exchange Static RPC Ports

I am currently working on an Exchange migration from 2003 to 2010. For the implementation of a load balancing solution for the CAS/HUB servers I needed to set Static RPC Ports for the RPC Client Access Service and the Exchange Address Book Service. The procedure of changing these ports is described on the Technet Wiki: […]

Exchange 2010 Install-ADTopologyService 0x800706D

I got the following error while installing Exchange 2010: “There are no more endpoints available from the endpoint mapper. (Exception from HRESULT: 0x800706D9)” I looked up HRESULT 0x800706D9 which is defined in winerror.h as EPT_S_NOT_REGISTERED with the same error text. I looked at the ExchangeSetup.log in C:\ExchangeSetupLogs and this indicates that the error occurs when […]

AD Internals: Reset RID Allocation Pool

A few days ago I wrote about how RID Allocation Pools work in Active Directory (see AD Internals: Display RID Allocation Pools) The article includes a script to dump all RID information for the whole domain. I will be using this script, rIDump.ps1 in this article. In my test environment I had a problem with […]