The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Posts Tagged ‘HP Servers’

Nice to Know – The hidden location for all HP servers drivers

Posted by Mikael Nystrom on November 9, 2016

The latest version of HP support pack was released recently, 2016.10.0 and we downloaded it to deploy it as usual, but Jorgen Brandelius at TrueSec could not resist the need of poking around on the media, and there is was, the hidden folder!!!

image
the magic folder.

What’s in the folder?

In the folder you will find the following structure, it is basically all drivers for Windows Server 2016 (and older supported OS as well) for all supported HP servers, it also includes agents for NANO server running on HP ProLiant.

image

What now?

Download, import and smile while you are deploying the HP server.

image

/mike

Posted in Deployment, Drivers, HP | Tagged: , , , , | 6 Comments »

Working in the Datacenter – Deploying HP Servers and configure BIOS for High Performance using PowerShell

Posted by Mikael Nystrom on March 8, 2016

If you have a HP ProLiant Gen 8 or Gen 9 it is possible to use PowerShell to configure the BIOS. One of the items I really like to configure is the Power Settings, in most cases you would like to have “performance” but the default setting is usually set in “Tree Hugging Mode” (also called power saving). This is especially true if server is going to be used as a Compute server (running Hyper-V).

You can read the previous posts here:

https://deploymentbunny.com/2016/03/07/working-in-the-datacenter-hp-bios-cmdlets-for-windows-powershell-x64/

https://deploymentbunny.com/2016/03/07/working-in-the-datacenter-application-wrapper-for-hp-bios-cmdlets-deploy-it-during-osd/

The Script:

<#
 Install Wrapper 1.0
 Author: Mikael Nystrom
 http://www.deploymentbunny.com 
#>
param($Username,$Password,$mode)
Function Invoke-Exe{
    [CmdletBinding(SupportsShouldProcess=$true)]

    param(
        [parameter(mandatory=$true,position=0)]
        [ValidateNotNullOrEmpty()]
        [string]
        $Executable,

        [parameter(mandatory=$false,position=1)]
        [string]
        $Arguments
    )

    if($Arguments -eq "")
    {
        Write-Verbose "Running $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru"
        $ReturnFromEXE = Start-Process -FilePath $Executable -NoNewWindow -Wait -Passthru
    }else{
        Write-Verbose "Running $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru"
        $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru
    }
    Write-Verbose "Returncode is $($ReturnFromEXE.ExitCode)"
    Return $ReturnFromEXE.ExitCode
}
Function Get-OSVersion([ref]$OSv){
    $OS = Get-WmiObject -class Win32_OperatingSystem
    Switch -Regex ($OS.Version)
    {
    "6.1"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 7 SP1"}
                Else
            {$OSv.value = "Windows Server 2008 R2"}
        }
    "6.2"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 8"}
                Else
            {$OSv.value = "Windows Server 2012"}
        }
    "6.3"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 8.1"}
                Else
            {$OSv.value = "Windows Server 2012 R2"}
        }
    DEFAULT { "Version not listed" }
    } 
}
Function Import-SMSTSENV{
    try
    {
        $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
        Write-Output "$ScriptName - tsenv is $tsenv "
        $MDTIntegration = "YES"
        
        #$tsenv.GetVariables() | % { Write-Output "$ScriptName - $_ = $($tsenv.Value($_))" }
    }
    catch
    {
        Write-Output "$ScriptName - Unable to load Microsoft.SMS.TSEnvironment"
        Write-Output "$ScriptName - Running in standalonemode"
        $MDTIntegration = "NO"
    }
    Finally
    {
    if ($MDTIntegration -eq "YES"){
        $Logpath = $tsenv.Value("LogPath")
        $LogFile = $Logpath + "\" + "$ScriptName.log"

    }
    Else{
        $Logpath = $env:TEMP
        $LogFile = $Logpath + "\" + "$ScriptName.log"
    }
    }
}
Function Start-Logging{
    start-transcript -path $LogFile -Force
}
Function Stop-Logging{
    Stop-Transcript
}

# Set Vars
$SCRIPTDIR = split-path -parent $MyInvocation.MyCommand.Path
$SCRIPTNAME = split-path -leaf $MyInvocation.MyCommand.Path
$SOURCEROOT = "$SCRIPTDIR\Source"
$LANG = (Get-Culture).Name
$OSV = $Null
$ARCHITECTURE = $env:PROCESSOR_ARCHITECTURE

#Try to Import SMSTSEnv
. Import-SMSTSENV

#Start Transcript Logging
. Start-Logging

#Detect current OS Version
. Get-OSVersion -osv ([ref]$osv) 

#Output base info
Write-Output ""
Write-Output "$ScriptName - ScriptDir: $ScriptDir"
Write-Output "$ScriptName - SourceRoot: $SOURCEROOT"
Write-Output "$ScriptName - ScriptName: $ScriptName"
Write-Output "$ScriptName - OS Name: $osv"
Write-Output "$ScriptName - OS Architecture: $ARCHITECTURE"
Write-Output "$ScriptName - Current Culture: $LANG"
Write-Output "$ScriptName - Integration with MDT(LTI/ZTI): $MDTIntegration"
Write-Output "$ScriptName - Log: $LogFile"

$Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList "$env:COMPUTERNAM\$UserName", ($Password | ConvertTo-SecureString -AsPlainText -Force)
$Con = Connect-HPBIOS -IP $env:COMPUTERNAME -Credential $Credentials -ErrorAction Stop

Write-Output "$ScriptName -  Selected Mode: $Mode"

if($mode -eq "FullPower"){
    Set-HPBIOSPowerProfile -Profile Maximum_Performance -Connection $Con
    Set-HPBIOSPowerRegulator -Regulator Static_High_Performance -Connection $Con
    Write-Output "$ScriptName - HP PowerProfile is set to $((Get-HPBIOSPowerProfile -Connection $Con).HPPowerProfile)"
    Write-Output "$ScriptName - HP PowerRegulator is set to $((Get-HPBIOSPowerRegulator -Connection $Con).HPPowerRegulator)"
}

if($mode -eq "TreeHugging"){
    Set-HPBIOSPowerProfile -Profile Minimum_Power -Connection $Con
    Set-HPBIOSPowerRegulator -Regulator Dynamic_Power_Savings -Connection $Con
    Write-Output "$ScriptName - HP PowerProfile is set to $((Get-HPBIOSPowerProfile -Connection $Con).HPPowerProfile)"
    Write-Output "$ScriptName - HP PowerRegulator is set to $((Get-HPBIOSPowerRegulator -Connection $Con).HPPowerRegulator)"
}

. Stop-Logging

Using the script from the command prompt:

Execute the following from an elevated Command Prompt

PowerShell.exe -ExecutionPolicy ByPass -File Configure-HPBIOS.ps1 -Mode FullPower -UserName Administrator –Password P@ssw0rd

Using the script from the PowerShell prompt:

Execute the following from an elevated PowerShell Prompt

.\Configure-HPBIOS.ps1 -Mode FullPower -UserName Administrator –Password P@ssw0rd

Using the script in a Task Sequence when you deploy the server:

You can run the script as PowerShell script in the Task Sequence, or run it as an Application. I prefer to use it as an application since it then can be controlled using rules.

The Config-HPBios application:

image
Here you can see the Quiet install command in the application.

Quiet install command: PowerShell.exe -ExecutionPolicy ByPass -File Configure-HPBIOS.ps1 -Mode %HPPowerMode% -UserName Administrator -Password %AdminPassword%

This command will execute PowerShell and feed the script with Property HPPowerMode (that needs to be FullPower or TreeHugging). This property can be set in CustomSettings.ini or as step in the Task Sequence.

image
Here you can see the Set Task Sequence Variable HPPowerMode set to FullPower.

The actually configuration will be done during the Install step, since it is an application in my case. but it is possible to run the app directly after the Variable has been set.

Check the log file for the result:

image
The log file shows the settings.

/mike

Posted in HP, OS Deployment, OSD, PowerShell | Tagged: , , , , | 1 Comment »

Working in the Datacenter – Application Wrapper for HP BIOS CmdLets – Deploy it during OSD

Posted by Mikael Nystrom on March 7, 2016

In a previous blogpost a shortly described what you can do with the “HP BIOS CmdLets for Windows PowerShell (x64)” and in this post I’ll give you a PowerShell wrapper for LTI/ZTI to deploy it.

Download from installer from

http://h20566.www2.hpe.com/hpsc/swd/public/detail?sp4ts.oid=5440658&swItemId=MTX_1cedc5b3a4ec4bc7a942f6e682&swEnvOid=4168

image

The LTI/ZTI Wrapper:

It is very simple, basically create a folder called “Install – HPBIOSCmdlets”, in the folder, create a folder called “Source” and in that folder you save the MSI file from HP (the download is a EXE, just unzip it and it will be a MSI file inside) and then you save the PowerShell installer in the “Install – HPBIOSCmdlets” folder, like this

image

Here is the:

<#
 Install Wrapper 1.0
 Author: Mikael Nystrom
 http://www.deploymentbunny.com 
#>

Function Invoke-Exe{
    [CmdletBinding(SupportsShouldProcess=$true)]

    param(
        [parameter(mandatory=$true,position=0)]
        [ValidateNotNullOrEmpty()]
        [string]
        $Executable,

        [parameter(mandatory=$false,position=1)]
        [string]
        $Arguments
    )

    if($Arguments -eq "")
    {
        Write-Verbose "Running $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru"
        $ReturnFromEXE = Start-Process -FilePath $Executable -NoNewWindow -Wait -Passthru
    }else{
        Write-Verbose "Running $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru"
        $ReturnFromEXE = Start-Process -FilePath $Executable -ArgumentList $Arguments -NoNewWindow -Wait -Passthru
    }
    Write-Verbose "Returncode is $($ReturnFromEXE.ExitCode)"
    Return $ReturnFromEXE.ExitCode
}
Function Get-OSVersion([ref]$OSv){
    $OS = Get-WmiObject -class Win32_OperatingSystem
    Switch -Regex ($OS.Version)
    {
    "6.1"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 7 SP1"}
                Else
            {$OSv.value = "Windows Server 2008 R2"}
        }
    "6.2"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 8"}
                Else
            {$OSv.value = "Windows Server 2012"}
        }
    "6.3"
        {If($OS.ProductType -eq 1)
            {$OSv.value = "Windows 8.1"}
                Else
            {$OSv.value = "Windows Server 2012 R2"}
        }
    DEFAULT { "Version not listed" }
    } 
}
Function Import-SMSTSENV{
    try
    {
        $tsenv = New-Object -COMObject Microsoft.SMS.TSEnvironment
        Write-Output "$ScriptName - tsenv is $tsenv "
        $MDTIntegration = "YES"
        
        #$tsenv.GetVariables() | % { Write-Output "$ScriptName - $_ = $($tsenv.Value($_))" }
    }
    catch
    {
        Write-Output "$ScriptName - Unable to load Microsoft.SMS.TSEnvironment"
        Write-Output "$ScriptName - Running in standalonemode"
        $MDTIntegration = "NO"
    }
    Finally
    {
    if ($MDTIntegration -eq "YES"){
        $Logpath = $tsenv.Value("LogPath")
        $LogFile = $Logpath + "\" + "$ScriptName.txt"

    }
    Else{
        $Logpath = $env:TEMP
        $LogFile = $Logpath + "\" + "$ScriptName.txt"
    }
    }
}
Function Start-Logging{
    start-transcript -path $LogFile -Force
}
Function Stop-Logging{
    Stop-Transcript
}

# Set Vars
$SCRIPTDIR = split-path -parent $MyInvocation.MyCommand.Path
$SCRIPTNAME = split-path -leaf $MyInvocation.MyCommand.Path
$SOURCEROOT = "$SCRIPTDIR\Source"
$LANG = (Get-Culture).Name
$OSV = $Null
$ARCHITECTURE = $env:PROCESSOR_ARCHITECTURE

#Try to Import SMSTSEnv
. Import-SMSTSENV

#Start Transcript Logging
. Start-Logging

#Detect current OS Version
. Get-OSVersion -osv ([ref]$osv) 

#Output base info
Write-Output ""
Write-Output "$ScriptName - ScriptDir: $ScriptDir"
Write-Output "$ScriptName - SourceRoot: $SOURCEROOT"
Write-Output "$ScriptName - ScriptName: $ScriptName"
Write-Output "$ScriptName - OS Name: $osv"
Write-Output "$ScriptName - OS Architecture: $ARCHITECTURE"
Write-Output "$ScriptName - Current Culture: $LANG"
Write-Output "$ScriptName - Integration with MDT(LTI/ZTI): $MDTIntegration"
Write-Output "$ScriptName - Log: $LogFile"

$Executable = "msiexec.exe"
$Arguments = "/i ""$SOURCEROOT\HPBIOSCmdlets-x64.msi"" /qb"

Write-Output "$ScriptName - Executable: $Executable"
Write-Output "$ScriptName - Arguments: $Arguments"

Invoke-Exe -Executable $Executable -Arguments $Arguments -Verbose

. Stop-Logging

Create the Application in the Task Sequence:

(This how it is done in LiteTouch, but it will be the same in ConfigMgr)

Create a new Application, browse to the folder you created and use this as your command line:

PowerShell.exe -ExecutionPolicy Bypass -File Install-HPBIOSCmdlets-x64.ps1

image
It should look something like this.

The logfile

It will end up in C:\Windows\Temp\Deploymentlogs (for LTI) and should look something like this:

image

/mike

Posted in BIOS, HP, OS Deployment, OSD, PowerShell | Tagged: , , , , , | 2 Comments »

Back to Basic–Where to find Drivers for Servers and Clients

Posted by Mikael Nystrom on July 8, 2014

During one of the sessions today (at the Geek Week in Redmond) we talked about drivers and where to find them. This is absolutely nothing “new” or amazing, its more of a “note to attendees” kind of post.

HP Clients

The HP SoftPaq Download Manager from HP. The tools has the ability to download drivers for every business model that is supported into a repository, which you can then export drivers from. It also provides .CVA files that gives you instructions on how to silently execute drivers and tools that needs to be installed as an application. HP also provides .CAB files for some newer models. http://www8.hp.com/us/en/ads/clientmanagement/drivers-bios.html

image

Dell Clients

Dell have a really great webpage with ready made .CAB files, ready for download. It also includes Windows PE drivers, be sure to pick the correct version. A general rule is to NOT add any Windows PE driver unless you really NEED them, in other words. If you get any IP address and you can see the disk using diskpart, you don’t NEED any drivers. http://en.community.dell.com/techcenter/enterprise-client/w/wiki/2065.dell-driver-cab-files-for-enterprise-client-os-deployment.aspx

image

Lenovo Clients

For Lenovo a nice tool is the ThinkVantage Update Retriever. The tool is pretty straightforward, just create a repository folder, download all the drivers for your models. The most important thing here is that you should not grab the drivers from that folder, instead you should use the to tool to export them. http://support.lenovo.com/en_US/detail.page?LegacyDocID=TVAN-ADMIN

(For fun, search for it and you will ALWAYS find at least one dog… http://www.bing.com/images/search?q=ThinkVantage+Update+Retriever&qs=n&form=QBIR&pq=thinkvantage+update+retriever&sc=5-29&sp=-1&sk=)

image

HP Servers

For HP Servers the best way I have found so far is to install the HP Proliant in the operating system during deployment using (scripts or MDT/SCCM applications/Packages or in SCVMM as Host Command line post OSD)

That means that I usually don’t import other drivers then Network and Storage drivers in the deployment solution, since the Support Pack will take care of the rest.

The HP Proliant Service Pack: http://h17007.www1.hp.com/us/en/enterprise/servers/products/service_pack/spp/index.aspx

image

However, you do need Windows PE Drivers and the easiest way to find them is to look somewhere else. You will find them in the HP Scripting Toolkit for Windows.

http://www.hp.com/swpublishing/MTX-4bbbd9504e2a4286b6ae8300b4

image

Dell Servers

I have to be honest, I do deploy more HP servers then Dell servers, but when I do I use the standard webpage to download drivers. For servers Dell provides Driver Application Packages, which will install all the drivers for that particular model. Download it and run it as a part of the TaskSequence or do it Post OSD.

http://www.dell.com/support/home/us/en/04/Products/ser_stor_net/poweredge

image

What about System Center Integration?

Yes, there are ready made applications for System Center Integration.

For HP it is called Insight Management: https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=IMDVD#7.3

For Dell it is called OpenManage Integration Suite for Microsoft System Center: http://en.community.dell.com/techcenter/systems-management/w/wiki/4111.openmanage-integration-suite-for-microsoft-system-center.aspx

/Mike

Posted in Drivers | Tagged: , , , , , | 5 Comments »