LSM provides an example Windows Script illustrating how to place files on a Windows Machine.
In this example:
/home/LinMin/service/serviceScripts/ram_os_Scripts/LSM_WindowsSysprepGeneralize_OnReboot.sh
Upon execution of the example Windows Script on the RAM Agent, a Windows Script LSMsysprep.cmd gets placed in 2 locations on the Windows file system:
%WINDIR%\Users\Administrator\LSMsysprep.cmd
%WINDIR%\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\LSMsysprep.cmd
Upon reboot and login, the sysprep command gets automatically executed with the parameters:
sysprep.exe /generalize /generalize /reboot /oobe
Select example Script as a Payload stage:
Payload Manage Stages > Select Script > LSM RAM Agent deploys Windows Script to invoke sysprep to generalize the OS on reboot > Commit
Copy the example Script then edit and register/update it
Copy the file to:
/home/LinMin/service/serviceScripts/User_source_ram_os_Scripts/My-Windows-Example-Script.sh
Edit the file, then register the Script so it can be used as a Payload stage:
Scripts > Source User RAM Agent Scripts to Register or Replace > [Register] My-Windows-Example-Script.sh > Commit
If you further modify the file, you need to replace the previously-registered Script, after making sure that it is Not In Use:
Scripts > Source User RAM Agent Scripts to Register or Replace > [Replace] My-Windows-Example-Script.sh > Commit
Search keyword(s): user_scripts