Category Archives: IT Stuff

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

System Center Config Manager 2012 R2 Error 0x80004005 when loading task sequence on Surface Pro 3

Windows Command Prompt time and date commands
Windows Command Prompt time and date commands

This is an interesting one that i came across recently whilst trying to deploy an image to a brand new Microsoft Surface Pro 3.

I had two sitting on the bench ready to deploy our stock Windows 8.1 image. The first Surface PXE booted fine and jumped straight into the task sequence as normal however the second one came up with an error 0x80004005 when trying to look for the task sequences.

I knew that it wasn’t the image as surface numberone was working fine. I checked all of the usual things, replaced the ethernet cable etc and after a few reboots, I still had the same error.

After a little digging I found the solution.

The time in the UEFI BIOS was wrong.

The problem is that there is no option to change the time in the UEFI BIOS so you must change it using the PE environment instead:

  1. Make sure that your boot image has command support enabled.
  2. Boot into the Config Manager image.
  3. Before proceeding any further, press the F8 key (Fn + F8).
  4. At the command prompt type the ‘time’ command to change the current time.
  5. Next type the ‘date’ command and enter the correct date following the format for the locale of the PE.
  6. Verify that it has applied by typing

    time /t’

    and then

    date /t

  7. Close the command prompt and continue with your build.

 

Microsoft OneDrive for Business now offers 1 terabyte of cloud storage per user!

Taken from ZDNet Article

The Microsoft OneDrive for Business team is adding additional incentives meant to attract business users to its cloud-storage offering.

In an April 28 post entitled “Thinking outside the box” (which seems to be a reference to Microsoft competitors Box and/or Dropbox), the OneDrive for Business team announced the following:

  • An increase in OneDrive for Business default storage from 25GB to 1TB per user
  • The inclusion of 1TB of OneDrive for Business storage per user as part of Office 365 ProPlus subscriptions
  • New OneDrive for Business migration assistance from Microsoft (The blog post didn’t elaborate on specifically what Microsoft is offering on this front. But a spokesperson said those interested should contact their Microsoft account managers or partner for details.)

In March 2014, Microsoft officials announced that OneDrive for Business (formerly known as SkyDrive Pro) would be available both as part of a number of existing Office 365 plans, as well as for purchase as a standalone service — something that wasn’t the case with SkyDrive Pro. The standalone version provided business users with 25 GB of storage per employee, with an option to purchase additional storage, offline sync and access from multiple devices. Now that default storage threshold is 1 TB.

Microsoft officials announced during earnings last week that Office 365 is currently on a $2.5 billion annual run rate.

“The cloud is about breaking down walls between people and information. Not building a new set of islands in the sky. Make sure you bet on a file sync and share solution that helps you embrace that,” said Corporate Vice President John Case in the conclusion of today’s blog post.

All Office 365 plans that include OneDrive for Business will see the increase to 1 TB. This includes:

  • All O365 E plans (E1, E3, E4)
  • O365 Small Business
  • O365 Small Business Premium
  • O365 Midsize Business
  • All SharePoint Online plans (SharePoint Online Plan 1 & Plan 2)
  • OneDrive for Business (standalone) with Office Online

As to when new and existing customers will see the 1TB bump, a Microsoft spokesperson said: “Customer eligibility is effective today, but as with service updates roll-out of these features will happen over the next few months.”

Automate Windows 7 Enterprise Activation via ConfigMgr SCCM 2012

sccm

Recently we have been seeing more of our Windows 7 Enterprise Builds needing manual activation against our Enterprise KMS.

The manual process is to set the KMS server and then activate once booted into Windows using the following two commands:

slmgr /skms yourKMSserver.domain.com
slmgr /ato

Adding these two entries into our SCCM task sequence seems to work in principal but there is no silent switch resulting in a confirmation popup .

The solution to this is to use cscript.

In SCCM ConfigMgr, I created a new group in the Task Sequence called “Activate Windows” and added two Run Command line tasks underneath it.

The first task named “Set KMS” with the command line task of:

cscript c:\\windows\\system32\\slmgr.vbs /skms yourKMSserver.domain.com

The second named “Activate against KMS” with the command line task of:

cscript c:\\windows\\system32\\slmgr.vbs /ato

For more info about slmgr.vbs please see http://technet.microsoft.com/en-us/library/dn502540.aspx

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.