Rebelz – We have one of Europe’s widest ranges of BJJ & Grappling gear.

Add permission on all public folders in Exchange

I used this to get folder owner permissions on all public folders for the user daniel.

In Exchange Management Console:
Get-PublicFolder -recurse | Add-PublicFolderClientPermission -User daniel -AccessRights FolderOwner
Get-PublicFolder -recurse | Add-PublicFolderAdministrativePermission -User daniel -AccessRights AllExtendedRights

Search for an email address in Exchange / Active Directory

Open Active Directory Users and Computers. Right click on the domain and choose find. Change to custom search in the find field. Click on the advanced tab to enter a LDAP query.

LDAP query to find the email address

LDAP query to find all objects that uses the email domain

Troubleshooting account lockout issue

I had a problem when an Active Directory user account got locked out all the time.

I tried the following tools:
Account Lockout and Management Tools
NetWrix Account Lockout Examiner

I found out that when I unlocked the user account the bad password attempts started again and after 20 retries the account got locked out. I guessed that there must be a script or task some where on the network that used the user account and after a password change this caused the problem.

In LockoutStatus.exe (Account Lockout and Management Tools) I could see from what domain controller the lock originated from. I logged on to the domain controller and checked the security logs in the event viewer. I found the event ID 4740, that explained that user account was locked out and I also found out the caller computer name.

After a quick check on the caller computer I located the problem and solved it by adding the new password for the account.

Problem installaing .NET Framework 3.5 on Windows 8

When I tried to install .NET Framework 3.5 (includes .NET 2.0 and 3.0) from “control panel/programs and features/turn windows features on or off” I got the following error code 0x800F081F.
The solution was to install .Net 3.5 via DIM:
dism.exe /online /enable-feature /featurename:NetFX3 /Source:d:\sources\sxs /LimitAccess

D: = DVD drive/USB drive or ISO.

Can’t find and install iLO 2 driver on HP ProLiant DL380 G5 running Windows Server 2012

I had problem finding an iLO 2 driver that would work with Windows Server 2012. The server was a HP ProLiant DL380 G5. I had earlier managed to get an iLO 2 driver to work with Windows Server 2012 on a HP ProLiant ML350 G5.

The hardware ID was: VEN_103C&DEV_3302.
It was shown in the device manager as ipmi interface.

We solved this by this by installing cp013803.exe (HP ProLiant iLO 2 Management Controller Driver for Windows Server 2008 x64 Editions)

Restore a deleted Active Directory object with PowerShell

This requires that you have enabled the enable Active Directory Recycle Bin before you deleted the object.

Run Windows PowerShell as Administrator.

Start by loading the Active Directory module for Windows PowerShell:
Import-Module ActiveDirectory

List all deleted users (for some reason computer objects also are included when you use objectclass -eq “user):
get-adobject -filter ‘objectclass -eq “user” -AND IsDeleted -eq $True’ -IncludeDeletedObjects -properties IsDeleted,LastKnownParent | Format-List Name,IsDeleted,LastKnownParent,DistinguishedName

List all deleted groups:
get-adobject -filter ‘objectclass -eq “group” -AND IsDeleted -eq $True’ -IncludeDeletedObjects -properties IsDeleted,LastKnownParent | Format-List Name,IsDeleted,LastKnownParent,DistinguishedName

List all deleted computers:
get-adobject -filter ‘objectclass -eq “group” -AND IsDeleted -eq $True’ -IncludeDeletedObjects -properties IsDeleted,LastKnownParent | Format-List Name,IsDeleted,LastKnownParent,DistinguishedName

List all deleted objects:
get-adobject -filter ‘IsDeleted -eq $True’ -IncludeDeletedObjects -properties IsDeleted,LastKnownParent | Format-List Name,IsDeleted,LastKnownParent,DistinguishedName

If you want the output in a text file:
1. Create a script file named list_deleted_users.ps1 and save it to C:\Script\.
2. Use the follwong code in the script:
Import-Module ActiveDirectory
get-adobject -filter ‘objectclass -eq “user” -AND IsDeleted -eq $True’ -IncludeDeletedObjects -properties IsDeleted,LastKnownParent | Format-List Name,IsDeleted,LastKnownParent,DistinguishedName
3. Save the script file.
4. In PowerShell navigate to C:\Script and run the following command:
.\list_deleted_users.ps1 > output.txt
5. You will now have the output from the script in C:\Script\output.txt.

To restore an object named Daniel Svensson:
get-adobject -filter ‘name -like “Daniel Svensson*”‘ -IncludeDeletedObjects | Restore-ADObject

To test the restore you can use –whatif.
get-adobject -filter ‘name -like “Daniel Svensson*”‘ -IncludeDeletedObjects | Restore-ADObject –whatif

1 2 3 4 6