Category Archives: Work

Group Policy not applying – Inaccessible, Empty or Disabled

This is affecting Windows 8.1

Group Policies that used to work are now not applying. A quick check on the failing PC using gpresult –h shows that the policy is Inaccessible, Empty or Disabled.

GroupPolicy_Inaccessible_Empty_or_Disabled

No changes have been made to Group Policy.

Quick Solution

This is due to a Microsoft Patch to plug some holes in the way Group Policy is deployed ( https://support.microsoft.com/en-gb/kb/3159398 ) and affects group policies where there are security filtering enabled.

Find the Group Policy that is being affected and on the delegation tab give “read” permission to the “authenticated users” group. This will not apply the policy to all users as that is controlled using the “Apply group policy” permission. This will simply allow the GPO to be read and thus interpreted by the PC.

GPODelegation_Inaccessible_Empty_or_Disabled

Once updated, run a gpupdate /force and things should be back to the way they were.

Fixed_GPO_Inaccessible_Empty_or_Disabled

Alternative Solution

Remove the patch KB3159398 from all affected PCsUninstall_Patch_Inaccessible_Empty_or_Disabled

Export Windows Drivers to Central Store

Just made a script to export Drivers to a central store. Handy for when you need to grab a the drivers off of a PC to look at later or to update the rest of the estate with.

Link to resource on Spiceworks: https://community.spiceworks.com/scripts/show/3689-export-drivers-to-central-store

Script:

##########################################
###                                    ###
###         Script to extract          ###
###         latest drivers from        ###
###         windows system and         ###
###         dump to central store      ###
###                                    ###
### By Patrick Louis-Jean     v1       ###
##########################################


### Variables ###
$CentralStore = "\\server\Shares\Drivers" #Where Drivers will be stored centrally
$LocalStore = "C:\Drivers" #working folder on local machine

### Showtime! ###
$SystemOS = (Get-WmiObject -class Win32_OperatingSystem).Caption
$ComputerMake = "$((Get-WmiObject -Class win32_computersystem).Manufacturer)"
$DateTime = Get-date -Format yyyy-MM
$DriverStore = "$LocalStore\$SystemOS\$ComputerMake $((Get-WmiObject -Class win32_computersystem).Model) $DateTime"
mkdir $DriverStore
cd $DriverStore
$DriversList = Export-WindowsDriver -Online -Destination $DriverStore

foreach ($Driver in $DriversList) {
    #Make Class Directory
    $ClassDirectory = $DriverStore+"\"+$Driver.ClassName
    if (!(Test-Path $ClassDirectory)){
                 New-Item $ClassDirectory -type directory
    }
    #Make Provider Directory
    $ProviderDirectory = $ClassDirectory+"\"+$Driver.ProviderName
    if (!(Test-Path $ProviderDirectory)){
                 New-Item $ProviderDirectory -type directory
    }
    #Move Drivers to Folder
        #Get Original Folder Name
        $OrigDriverFolder = $Driver.OriginalFileName
        $OrigDriverFolder = $OrigDriverFolder.replace("C:\Windows\System32\DriverStore\FileRepository\","") #Assuming all drivers are stored here!
        $position = $OrigDriverFolder.IndexOf("\")
        $OrigDriverFolder = $OrigDriverFolder.Substring(0,$position)
        $OrigDriverFolder
        #Make New Folder Name
        $NewDriverFolder = $ProviderDirectory+"\"+$OrigDriverFolder+"_v"+$Driver.Version
        $NewDriverFolder
        #Move Folder
        robocopy $DriverStore"\"$OrigDriverFolder $NewDriverFolder /E /MOVE /NP
}

#Output List of Drivers to CSVFile
$DriversList | Select OriginalFileName, ClassName, ClassDescription, ProviderName, Version |Sort-Object OriginalFileName |  Export-Csv -Path $DriverStore"\DriverList.csv" -NoTypeInformation

#Move to Central Store
robocopy $LocalStore $CentralStore /E /MOVE /NP

First steps for troubleshooting Group Policy Errors

gpo

Group policy can be a bit of a pain to troubleshoot.
Here are a few pointers to get you going in the right direction when trying to fix errors:

  • Make sure you are running on a fast link. Preferably an Ethernet cable
  • Group policy might simply have not updated. At a command prompt run gpupdate /force
  • Running a Group Policy Results report can show you what policies have been applied. At a command prompt type gpresult /h path/to/file.html
  • Take a look at the event log to see if anything jumps out

Following these quick tips should get you on the right path to finding the problem.

Exchange Version and Build numbers to Service Packs

exchange-PowerShell

I was administering an Exchange 2007 installation today and needed to know what service pack it was running. The problem is that exchange does not display as a service pack, only an increase in version. A bit of googling revealed the following microsoft page that contains the version to Service pack information which i have duplicated at the bottom of this post for ease  http://support.microsoft.com/?kbid=158530

Find the Version of Exchange 2007

To find out the build number of Exchange 2007, launch an Exchange Management Shell and run the following command:

Get-ExchangeServer | fl name,edition,admindisplayversion
This will then give you the build number in the form of:

Name : EXCH01A
Edition : Standard
AdminDisplayVersion : Version 8.1 (Build 240.6)

Exchange Server Version lists 2003-2010

Microsoft Exchange Server 2003 6.5.6944 October 2003
Microsoft Exchange Server 2003 SP1 6.5.7226 May 2004
Microsoft Exchange Server 2003 SP2 6.5.7638 October 2005
Microsoft Exchange Server 2003 post-SP2 6.5.7653.33 March 2008
Microsoft Exchange Server 2003 post-SP2 6.5.7654.4 August 2008
Microsoft Exchange Server 2007 8.0.685.24 or 8.0.685.25 December 2006
Microsoft Exchange Server 2007 SP1 8.1.0240.006 November 2007
Microsoft Exchange Server 2007 SP2 8.2.0176.002 August 2009
Microsoft Exchange Server 2010 14.00.0639.021 October 2009

How not to move your iTunes music!

This is a bit of a lesson to myself on how iTunes is set up and the bizzareness of it all.
I was at a client’s to fix their laptop that was running sluggish and on which skype was refusing to work on. On inspection, I found that the primary partition was running seriously low on space and as such the file system was incredibly fragmented.

move-itunes-library-large
A quick scan with treesize showed the the majority of the hard drive space was being used up by the client’s music in iTunes. Luckily the hard drive was partitioned into two drives and the seccond partition was practically empty and had ample space if I was to move the mucus across to it.
Firing up iTunes, I went into the settings and told the program to use a folder on the second partition as the primary store for the music. After applying the settings, nothing happened an the mucsic was still on the primary partition. Digging a little deeper, I found that I needed to tell iTunes to we catalog it’s music and it would then move the music across to the new location – the. All I would need to do is delete the music from the old location under my music.
After about 40 mins, the music had finished copying across so I went ahead and deleted the iTunes folder in my music, emptied the recycle bin and started a full defrag of the system drive using myDefrag.
This is where my mistake was – instead of deleting just the music, I had accidently deleted the iTunes database as well, meaning that all of the client’s playlists and purchased songs list was lost. Add to the fact that a full defrag had taken place, there was no way that I was going to be able to recover the files with an undelete utility. Bugger!
Luckily, I was able to rebuild the libarary by adding the moved files back into iTunes and then syncing the client’s iPhone and iPod with iTunes to recreate the playlists. Enven the purchased songs were playable though they were not showing up in their own little playlist. The client was happy with the results, I got his laptop up to normal speed and most importantly got skype running.
The moral of the story?
Do not delete everything from the iTunes folder if moving your music and always take a backup of the database first. Pretty common sense really, but even us IT guys slip up once in a while!