Thursday , December 12 2024
Home - Development

Development

Easy Find OU in a DistinguishedName with PowerShell

There are a couple of ways to find the OU of an Object, some are long-winded ways splitting and counting characters.  The best way I’ve come up with for a quick and case insensitive check: [crayon-6759c0a96e5a2898219802/] A better example of the use in code: [crayon-6759c0a96e5ab441089449/] The Case Culture fixes up the compare of string being a different case of “OU=”, …

Read More »

GroupWise User Mailbox Audit of Proxy Rights/Shared Folders/Archive Locations

Overview The tool is used to audit the Shared Folders, Proxy Access and Archive Path being used by users in a GroupWise System.  The tool written in Visual Basic Scripting (VBS).  It is safe for quick and easy deployment in mixed Novell/Microsoft environment. The auditing tool has been designed to only activate when a GroupWise client is active and will …

Read More »

Powershell Get-Counters in a usable form from CookedValue

Sometime ago now I was given the challenge to get the value out of a get-counter in a Powershell, I thought the answer snippet should be posted for future reference. The following Powershell command gives a value buried with result information. [crayon-6759c0a96ff1b016873345/] The result is given: [crayon-6759c0a96ff22213408952/] To get the true value to be used in other powershell code we …

Read More »

Updating Active Directory User Objects from CSV files

Sometimes it’s better to get updates for Active Directory objects supplied in the form of a Excel spreadsheet.  Using the information you can then run the following script to update objects with information contain the rows/columns of a spreadsheet (CSV file).  What makes this a little simplier the column headers are the AD properties to be udpated. Another issue covered in …

Read More »

Exchange 2010 Add Mailbox folder permissions including subfolders

I’m always asked how to add a user to have Mailbox folder permissions for a folder and sub-folder in another users mailbox.  Exchange 2010 (SP1 for Set)  includes to new commands ‘Add-MailboxFolderPermission’ and ‘Set-MailboxFolderPermission’. Save the following in a new .ps1 file and run with Exchange management rights making changes to the script as required. ForEach($folder in (Get-MailboxFolderStatistics MailAliasofSharer| Where { …

Read More »

Active Directory Password Last Changed Export Tool

VBScript program to output all users in the domain with the date and time that each last changed their password. If passwords expire for all users, this program can be used to identify old unused accounts that can be disabled and eventually deleted. This program uses the pwdLastSet attribute to determine when the password was last set. Because this attribute …

Read More »

Checking LDAP uSNChanged (integer8 value) in VB .net

Having problems finding a way to use integer8 values from Active Directory ldap in a VB.net Application, I thought i’ll show a simple function written to check the AD uSNChanged. Just call the function with the DN of the object to check. Must include: [vb] Imports System.Reflection [/vb] Function code: [vbnet]Private Function _ADObjectUsn(ByVal xDN As String) Dim xLdapConnection As New …

Read More »