The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…

  • Archives

  • Meta

Posts Tagged ‘System Center 2012 R2’

Working in the Datacenter – I need to know everything about my VHD’s in my SCVMM environment

Posted by Mikael Nystrom on November 25, 2016

I was asked about getting more information about all the VHDs in a SCVMM environment (you now how you are). It is actually easy to do this, so i created a function that uses the SCVMM PowerShell module to grab all data and does a calculation on the expansion rate in percent for all disks, it pretty much gives you this:

image
Result.

The result will be that you now know where they are, sizes, expansion, type, parents, and some more info as well, and if you know, you can act.

You can grab the module from GitHub: https://github.com/DeploymentBunny/Files/tree/master/Tools/Get-VIASCVMMDiskInfo

/mike

Posted in PowerShell, System Center 2012 R2, System Center 2016, System Center Virtual Machine Manager | Tagged: , , , | Leave a Comment »

Working in the Datacenter – Deploying the DPM agent using PowerShell

Posted by Mikael Nystrom on March 10, 2016

Last night i was deploying a DPM server for a customer and we needed to deploy the DPM agent on a few machines. It is well know that DPM can do push agent install, but the requirements is to open high ports on every client, well lets state that it is not something any customer likes to do, so that means that we will use the Attach Agent function in DPM and that require the agent to be installed first.

The trick is not to install it, rather running the setDpmServer command that will do a connection against the DPM server, resulting in the double hop issue in Windows. The real solution is to use the existing software deployment solution to push the agent or to install the agent when the server is deployed, but in this case we needed a quick-and-dirty method to get it out to a few servers.

So the script will copy the installers to the target, install the agent, configure the agent and add the agent to the DPM server. It works with multiple servers at the same time. It uses CredSSP to fix the double-hop issue, which was ok for this customer.

The Script


Param(
    $Servers,
    $UserName,
    $Password,
    $DMPServerName
)

$SecurePassword = $Password | ConvertTo-SecureString -AsPlainText -Force
$User = “$env:USERDOMAIN\$UserName”
$Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList $User, $SecurePassword

Foreach($Server in $Servers){
    Enable-WSManCredSSP -Role Client -Force -DelegateComputer $Server 
    New-Item -Path "\\$Server\c$\DPMinstall" -ItemType Directory -Force 
    Copy-Item -Path 'C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\ProtectionAgents\RA\4.2.1205.0\amd64' -Destination "\\$Server\c$\DPMinstall" -Container -Force -Recurse
    Invoke-Command -ComputerName $Server -ScriptBlock {
        Enable-WSManCredSSP -Role Server -Force
        cmd.exe /c C:\DPMInstall\amd64\DPMAgentInstaller_x64.exe /q /IAcceptEula
        & 'C:\Program Files\Microsoft Data Protection Manager\DPM\bin\SetDpmServer.exe' -dpmServerName $DMPServerName
    } -EnableNetworkAccess -Credential $Credentials -Authentication Credssp
    & 'C:\Program Files\Microsoft System Center 2012 R2\DPM\DPM\bin\Attach-ProductionServer.ps1' -DPMServerName "$DMPServerName.$env:USERDNSDOMAIN" -UserName $UserName -Password $Password -Domain $env:USERDOMAIN -PSName $Server
}

/mike

Posted in Data Protection Manager, Datacenter, System Center 2012 R2 | Tagged: , , | 1 Comment »

Working in the Datacenter – Deploying Update Rollups for System Center 2012 R2

Posted by Mikael Nystrom on November 14, 2015

You really need to understand this: A Update Rollup should NEVER, EVER be deploying using WSUS!!! (or any other automated way, unless you know exactly what needs to be done before and after to make it work)

Why?

Microsoft provides all the Update Rollups trough Windows Update, so far so good, that makes it easy to deploy, so what is the big “nono” here? Well, the short story is that it does not work they way most people assumes. Deploying the Update Rollup could also require you to perform actions like this:

  • Update the SQL database using script
  • Add or modify Registry Keys
  • Manually update Agents
  • Troubleshoot issues

So, based on the history, please, just don’t do this, it does not work. You need to deploying a Update Rollup pretty much like a Service Pack, since that is what it really is. It does contain both bug fixes as well as new features and some of the features will change behavior, some of the new features needs to be enabled.

Ok, so how?

You need to follow the blogs from each product team so you know when they are released and then you need to follow the step-by-step instructions from the team. If you do have a test system (you can use a hydration kit to build one fast and use for testing, check http://www.deploymentbunny.com or http://deploymentresearch.com for more information

Ok, so When?

You have two options here, you either know someone that has tested and verified it or you wait 30 days and “listen” on the Internet, if you see 1.000.000 hits in a search engine, maybe you should wait to everyone else has fixed it.

Plan it a head

Ok, so this is what I tell all the customers I work with. Since Microsoft is releasing Update Rollups 4 times per year, create a schedule and set a side a couple of days (or more) every year to do this. It does not need to match the dates Microsoft will release it, just have a Maintenance Window 4 times every year to update/maintain your System Center platform.

Deploying Update Rollup 8 for System Center 2012 R2 – All Systems

https://support.microsoft.com/en-us/kb/3096378

Deploying Update Rollup 8 for System Center 2012 R2 – App Controller (No updates)

The last update for App Controller was System Center 2012 SP1 – http://support.microsoft.com/kb/2879276

Deploying Update Rollup 8 for System Center 2012 R2 – Data Protection Manager

Note: Could require a restart of all protected servers after deploying agent.

3086084 Update Rollup 8 for System Center 2012 R2 Data Protection Manager

Download the Data Protection Manager update package now

Deploying Update Rollup 8 for System Center 2012 R2 – Operations Manager

Note: Do not install this update rollup package immediately after you install the System Center 2012 R2 server. Otherwise, the Health Service state may not be initialized.

Note: Could require manually editing webpages

Note: Could require you to manually adding Registry Keys and Values

Note: Could require you to manually run SQL scripts to update the database

3096382 Update Rollup 8 for System Center 2012 R2 Operations Manager

Download the Operations Manager update package now

Deploying Update Rollup 8 for System Center 2012 R2 –  Orchestrator

3096381 Update Rollup 8 for System Center 2012 R2 Orchestrator

Download the Orchestrator update package now

Deploying Update Rollup 8 for System Center 2012 R2 – Service Provider Foundation

3096384 Update Rollup 8 for System Center 2012 R2 Service Provider Foundation

Download the Service Provider Foundation update package now

Deploying Update Rollup 8 for System Center 2012 R2 – Virtual Machine Manager

Note: Bare metal provisioning has changed

Note: Could require you to manually run SQL scripts

Note: Many new features, read and understand (and test them)

3096389 Update Rollup 8 for System Center 2012 R2 Virtual Machine Manager

Download the Server update package now

Download the Administrator Console update package now

Download the Guest Agent update package now

Deploying Update Rollup 8 for System Center 2012 R2 – Windows Azure Pack

3096392 Update Rollup 8 for System Center 2012 R2 Windows Azure Pack

Download the Windows Azure Pack update package now

Posted in Data Protection Manager, Datacenter, Operations Manager, Orchestrator, Service Provider Foundation, System Center 2012 R2, Virtual Machine Manager, Windows Azure Pack | Tagged: , , , , , , , , | Leave a Comment »

Nice To Know – Generate the -JobGroup ID in SCVMM Scripts

Posted by Mikael Nystrom on January 28, 2015

When working with SCVMM it is common to perform administrative tasks using PowerShell. One very nice thing in SCVMM is that when using the UI it will create a script in the end and the idea is that you should be able to use that script and you can, one time…why?

…because you need to generate a new ID every time you run the script, so how do you do that?

Generate a GUID using PowerShell:

$JobGroupID1 = [Guid]::NewGuid().ToString()

image
The result when generating a GUID.

Using the generated GUID in a SCVMM PowerShell script

Here is a list of CMDlets that uses _JobGroup

https://social.technet.microsoft.com/Forums/systemcenter/en-US/ab1e7054-69c7-44ee-a475-229f9557b653/jobgroup-what-cmdlets?forum=virtualmachinemanager

/mike

Posted in PowerShell, SCVMM, System Center 2012 R2 | Tagged: , , | Leave a Comment »

SommarKollo 2013 – MSAB

Posted by Mikael Nystrom on August 8, 2013

Här är mina sessioner (dom gula är mina sessioner)

image

image

Posted in Sommarkollo, System Center 2012, System Center 2012 R2, Training, Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2 | Tagged: , , , , , , , | 2 Comments »