20 mar 2013

SCCM by Davis: “Rory Canavan created the link SAM Intelligence | The ITAM Review” plus 19 more

SCCM by Davis: “Rory Canavan created the link SAM Intelligence | The ITAM Review” plus 19 more

Link to SCCM by Davis

Rory Canavan created the link SAM Intelligence | The ITAM Review

Posted: 20 Mar 2013 02:28 AM PDT

Before embarking upon a SAM Programme, take […]

Comments: 0

Rory Canavan created the link iQuate: Securing longevity for your Software Asset Management Programme (iQuate)

Posted: 20 Mar 2013 02:23 AM PDT

What happens to your SAM set-up once the […]

Comments: 0

ConfigMgr 2012 - Change Application Source Path

Posted: 31 Jan 2013 07:35 AM PST

Big thanks to Angel Redondo for helping out with this.

Changing the source path for packages in SCCM 2007 was pretty easy over the SMSProvider.
It's a bit different in ConfigMgr 2012.

Looking through the WMI Classes you'll find SMS_Application, SMS_DeploymentType, and eventually SMS_Content. This last one has the source path for the application content but you'll soon find out you can't manipulate this because it is a system class and only allowed to be used by the provider itself.

What you need to do is leverage the dlls provided with the AdminConsole. Then you need to understand that information in ConfigMgr is handled completely differently from 2007. That being data is stored in XML format in WMI and SQL to allow for SQL Replication to look after much of the hierarchical and global replication. It is really good and much more efficient but might take a couple of attempts to get used to. Also the content source is defined on the Deployment Type object.

To alter Applications, in particular something like the source path, you need to connect to the Application class, the instance and then deserialize the XML data. Then you can edit this information, serialize it and inject it back into the WMI object.

I am assuming Powershell and that the Admin Console is installed on the machine running the script.
First of all get your ConfigMgr assemblies into your script:
#import assemblies
[System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.ApplicationManagement.dll")
[System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.ApplicationManagement.Extender.dll")
[System.Reflection.Assembly]::LoadFrom("C:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\Microsoft.ConfigurationManagement.ApplicationManagement.MsiInstaller.dll")

#Specify your site server and sitecode:
$server = "configmgr01″
$code = "001″

#Get the applications (i'm only doing the latest version here):
#gwmi -ComputerName $server -Namespace root\sms\site_$code -class sms_application | ?{$_.IsLatest -eq $true}

#Either save this an object or loop on the fly, i'm looping on the fly:

gwmi -ComputerName $server -Namespace root\sms\site_$code -class sms_application | ?{$_.IsLatest -eq $true} | %{
#get the instance of the application
$app = [wmi]$_.__PATH
#deserialize the XML data
$appXML = [Microsoft.ConfigurationManagement.ApplicationManagement.Serialization.SccmSerializer]::DeserializeFromString($app.SDMPackageXML,$true)
#loop through the deployment types
foreach($dt in $appXML.DeploymentTypes){
#find the installer element of the XML
$installer = $dt.Installer
#the content for each installer is stored as an single element array
$content = $installer.Contents[0]
"Current Path: " + $content.Location
#use a regular expression to modify the existing path to your new location
$newPath = $content.Location -replace '\\\\domain.loc\\unc\\share','\\namespace.loc\dfs'
"New Path : " + $newPath
if($newPath -ne $content.Location){
"Setting new path"
#this creates a new instance of content which will overwrite the older, this works cleaner than modifying the existing content path
#modifying existing tends to corrupt the data
$newContent = [Microsoft.ConfigurationManagement.ApplicationManagement.ContentImporter]::CreateContentFromFolder($newPath)
$newContent.FallbackToUnprotectedDP = $true
$newContent.OnFastNetwork = [Microsoft.ConfigurationManagement.ApplicationManagement.ContentHandlingMode]::Download
$newContent.OnSlowNetwork = [Microsoft.ConfigurationManagement.ApplicationManagement.ContentHandlingMode]::Download
$newContent.PeerCache = $false
$newContent.PinOnClient = $false
#set the content ID to the new content information you have created
$installer.Contents[0].ID = $newContent.ID
#inject the new data into the deserialized XML data
$installer.Contents[0] = $newContent
}
}
#reserialize the XML
$updatedXML = [Microsoft.ConfigurationManagement.ApplicationManagement.Serialization.SccmSerializer]::SerializeToString($appXML, $true)
#add the serialized XML data to the application object
$app.SDMPackageXML = $updatedXML
#put the changes to the instance
$app.Put()
}

Regional Settings depending on first 3 letter in computername in a task sequence.

Posted: 30 Jan 2013 11:20 PM PST

Hello.

So i wanted to set regional settings depending on the first 3 letter in the computer name when i deploy it, the best way i found was to use a XML and set it with the control.exe command for example control.exe intl.cpl,, /f:"%temp%\Denmark.xml"

This way i can set keyboard layout, location and format.

this is what the task sequence looks like.

Image

And under Options of each group i have a WMI query to check the first 3 letter in the name

SELECT * FROM Win32_ComputerSystem WHERE Name Like "XXX%"

i Created 2 files, one XML file containing the country codes and one cmd file that copies the file locally and then executes it, for some reason just a "Run Command" step did not work.

the cmd is very simple, it copies the xml file from the DP to the temp folder. and then runs the control.exe command notice the dp0 has no \ as it is already included in the variable.

copy %~dp0Sweden.xml %temp%\Sweden.xml
control.exe intl.cpl,, /f:"%temp%\Sweden.xml"

This is what the step looks like

Capture

The XML file was a little bit trickier as it contains different country codes, the GeoID, sv-SE, and an ID, and you can ofcourse add multiple "InputLanguageID" if you want more keyboard layouts.

<gs:GlobalizationServices xmlns:gs="urn:longhornGlobalizationUnattend">
<!– user list –>
<gs:UserList>
<gs:User UserID="Current" CopySettingsToDefaultUserAcct="true" CopySettingsToSystemAcct="true"/>
</gs:UserList>
<!– GeoID –>
<gs:LocationPreferences>
<gs:GeoID Value="221″/>
</gs:LocationPreferences>
<!– UI Language Prefernces –>
<gs:MUILanguagePreferences>
<gs:MUILanguage Value="sv-SE"/>
<gs:MUIFallback Value="en-GB"/>
</gs:MUILanguagePreferences>
<!– system locale –>
<gs:SystemLocale Name="SV-SE"/>
<!– input preferences –>
<gs:InputPreferences>
<gs:InputLanguageID Action="add" ID="041d:0000041d"/>
<gs:InputLanguageID Action="remove" ID="0409:00000409″/>
</gs:InputPreferences>
<!– user locale –>
<gs:UserLocale>
<gs:Locale Name="sv-SE" SetAsCurrent="true" ResetAllSettings="true">
</gs:Locale>
</gs:UserLocale>
</gs:GlobalizationServices>

GeoID you can find here but you need to use a HEX to Decimal converter to get what you want.

http://msdn.microsoft.com/en-us/library/windows/desktop/dd374073(v=vs.85).aspx

And here are the Locale ID:s

http://msdn.microsoft.com/en-us/goglobal/bb895996.aspx

here is a little more info on how to write the XML file

http://msdn.microsoft.com/en-us/goglobal/bb964650

 

When you have created all the XML files and CMD files but them in your source folder and create a package from it. you dont need to create a program.

5

As a last step in the regional settings group i have a rule that sais if the first 3 letters are NOT any of for example XXX, CCC, FFF it will set Swedish

Image

Chandan Sharma became a registered member

Posted: 19 Mar 2013 10:25 PM PDT

Comments: 0

Christian Morrison became a registered member

Posted: 19 Mar 2013 10:23 PM PDT

Comments: 0

ramakrishnudu became a registered member

Posted: 19 Mar 2013 09:46 PM PDT

Comments: 0

Jon became a registered member

Posted: 19 Mar 2013 08:39 PM PDT

Comments: 0

Jase T. Wolfe started the forum topic What sets property BDEDisablePreProvisioning referenced in ZTIBde.wsf? in the group Microsoft Deployment Toolkit (MDT)

Posted: 19 Mar 2013 07:32 PM PDT

It's referenced as an environmental variable in ZTIBde.wsf but it is really unclear what sets this or when it is available. That seems to be the only script that references it.

Comments: 0

Jase T. Wolfe joined the group Microsoft Deployment Toolkit (MDT)

Posted: 19 Mar 2013 07:20 PM PDT

Comments: 0

Christian Morrison became a registered member

Posted: 19 Mar 2013 06:39 PM PDT

Comments: 0

Windows Management Experts posted an update: SCCM 2012: Application Deployment Requirements This is an […]

Posted: 19 Mar 2013 03:34 PM PDT

SCCM 2012: Application Deployment Requirements

This is an article in a continuing series on the new Application model in SCCM 2012. You can find a high level overview of applications and how they differ from packages here: http://www.windowsmanagementexperts.com/sccm-2012-applications-vs-packages/sccm-2012-applications-vs-packages.htm.

Requirements allow administrators to target applications to users or devices that meet a certain setof conditions. The application model in SCCM 2012 expands greatly on the available requirements for packages. Now, administrators can target applications based on a wide variety of pre-defined rules. This part in the series will focus on the three categories of requirements: user, device, and custom.

You can add requirements to your application by opening the "Deployment Type" that needs a requirement and going to the "Requirements" tab. From here, you select "Add" and the category of the requirement. Multiple requirements can be added to one application.

User Requirements

There is one condition when selecting the user category – Primary device. For those new to SCCM 2012, the system assigns a computer to a user (known as Primary device) based on a time length that is set in the device client settings. This time-length can be set to whatever the administrator feels is appropriate. I have mine set to 8 hours (one working day) in a 14 day span (two working weeks).

This condition allows you to ensure that an end user can only install the application on their primary device. This can help a lot with licensing, because you can guaranteed that a user will not be able to walk around an organization and install a licensed program on multiple computers.

The converse is also true; you can set it where a user cannot install a given application on their primary device. I am not really sure why this would be necessary, but it is an option.

Device Requirements

Device requirements is exactly what it says – the administrator can base application installs on device information. Options include number of processors, memory amount, hard drive space requirements, etc. Any of these options come with logical operators so that targeting is simple.

This is also where administrators now set operating system requirements. This helps to ensure that end users are not trying to install 64-bit applications on 32-bit machines, and also that applications that require Windows 7 are not being installed on Windows XP. This condition works exactly the same way as it does with packages.

Two new options here are "Active Directory site" and "Organizational Unit". Both of these options can be used to deploy an application to devices in a particular department without having to build a collection in SCCM for them. If your AD is already set up for department-based OU's, there is no need to build a collection to deploy the application too. The administrator can simply define one of these conditions and be done.

Also, if you have multiple sites, applications can be required to be in one site or another using the "Configuration Manager site" condition. The "Operator" option allows the administrator to define an allowed group of sites, or a disallowed group of sites.

Custom Requirements

The custom category can cover anything that the user or device categories do not. There are options for file system, scripts, and SQL queries, just to name a few. As said in previous parts of this series, please always pay attention to the check-boxes talking about associating the requirement with a 64-bit application.

The four most useful custom conditions are file system, registry key / value, SQL query, and script. The file system condition can be used to detect if files or folders are / are not present. The application install can then be based on this. The same applies for the registry. This can be especially helpful with deploying application updates or add-ons where a base application is needed. The administrator can use these settings to define the rules by which these updates or add-ons are installed.

SQL queries can also be very helpful. The ability to query a SQL database opens up almost endless possibilities for application management. One such option is to create an application database for managing license numbers and which users should be able to install certain applications to keep within license agreements. It could also be used to query help-desk systems to see if an application is needed somewhere.

Finally, scripts can cover any other holes in requirements. You can load other libraries on the system to test for things, use WMI to test conditions, or anything else that is doable with a script. When you select Script, you are given the option to add one. From here, there are three scripting languages available: Jscript, Windows Powershell, and VBScript. From there, you can type your script in the box, or you can click "Open" and select a script that you already have prepared.

Summary

Exploring all of the new Requirement conditions in SCCM 2012 can really help with application deployment. Administrators can further ensure applications are only being installed on devices that need them and can adequately run them. If an application does not meet the defined requirements, it will show up the deployment reports for the application. This allows the administrator to see exactly why an application isn't suited for installation on a particular device.

Comments: 0

Emil Antonio changed their profile picture

Posted: 19 Mar 2013 02:00 PM PDT

Comments: 0

Panagiotis K. became a registered member

Posted: 19 Mar 2013 01:56 PM PDT

Comments: 0

Emil Antonio started the forum topic Why do I need to instal a Secondary Site in SCCM 2012 in the group System Center Suite 2012

Posted: 19 Mar 2013 01:55 PM PDT

What scenario would I need to install a Secondary Site when using SCCM 2012?

I'm planning to install a Primary Site in my location in Virginia (250 clients) but I also have computers/servers that I need to […]

Comments: 0

Emil Antonio started the forum topic Installing SCCM2012 in Win Server 2008 R2 versus Win 2012 in the group System Center Suite 2012

Posted: 19 Mar 2013 01:49 PM PDT

What are the benefits of installing System Center 2012 Config Manager in Windows Server 2012 compared to Windows Server 2008 R2?

Comments: 0

BYOD Is a Win-Win When It's User-Centric: Study

Posted: 19 Mar 2013 01:43 PM PDT

Dell subsidiary Quest Software hired research firm Vanson Bourne to conduct a study on how organizations worldwide are responding to the BYOD trend.

Emil Antonio joined the group System Center Suite 2012

Posted: 19 Mar 2013 01:40 PM PDT

Comments: 0

Emil Antonio became a registered member

Posted: 19 Mar 2013 01:10 PM PDT

Comments: 0

donald joined the group Operating System Deployment

Posted: 19 Mar 2013 12:58 PM PDT

Comments: 0

No hay comentarios:

Publicar un comentario

SCCM by Davis