Reviewed 9.30.2015
How To: Deploy Power Management Policies in an OS Provisioning Template
Disclaimer: This procedure is not native to LDMS OS Provisioning and is considered a custom solution. As such it is not supported by LANDesk and may have unintended consequences. Use this solution at your own risk.
Issue:
OS Provisioning templates do not contain Power Management actions. Also, Power Management is not part of the agent configuration. As such, Power Management Policies need to be pushed out to devices separately after the device is provisioned and the agent is installed. This adds an additional manual step to the process when preparing a new device for deployment or imaging devices in your environment.
Solution:
Power Management policies can be applied via command line.
The ldlogon share on your core server contains a PWM folder. This folder contains the XML file and the .ini file used by each of your power management policies. Each file has a version number - match this to the ID of your Power Management policies in the console:
For example:
LDCORE_v323_ProcTriggerSvcCfg.xml
LDCORE_v323.ini
To apply this version 323 policy, both the .xml and the .ini files should be copied to the LDClient directory on the target device, but renamed as follows:
- LDCORE_v323_ProcTriggerSvcCfg.xml
- Rename to: ProcTriggerSvcCfg.xml
- LDCORE_v323.ini
- Rename to: PWMScript.ini
Once copied, run "PWMCfg.exe /init" from the ldclient folder on the target device. This should apply the policy as defined in those files.
Step by Step:
There is more than one way to accomplish this within LDMS. Below are two common methods.
Using Copy File and Execute File template actions:
- Edit or create a Provisioning template. Ensure that the System Configuration group contains a Deploy Agent action since the LDMS agent is required before applying Power Management policies.
- Add a Map/Unmap drive to preferred server action to System Configuration and map a drive to your core's ldlogon share:
- Add a Copy File action to copy and rename the Power policy .xml file:
- Add a second copy file action to copy and rename the Power Policy .ini file:
- Finally, add an Execute File action to run PWMCfg.exe /init
A sample provisioning template .xtp has been attached to this article. It can be imported to your core. Please note, it was created in LDMS version 9.6 SP2 and may not work with older versions. It will also need to be configured with the specific details and file names for your environment, and is provided as an example. It will not be supported and should be used at your own risk.
Using a software distribution package:
- Create a script which copies the above .xml and .ini files and renames them. The source and destination locations, and file names, remain the same as above. After copying and renaming the files, the script should execute PWMCfg.exe /init
- Create a software distribution package and link it to the script you just created. For more info on creating a software package see this article:
LANDESK Software Distribution Landing Page - Add a Distribute Software action to your Provisioning Template, and select your script distribution package: