Hi Team ,I need perform below task using Task sequence in SCCM..can u help me here how to if you know about it..
Question
Hi Team ,I need perform below task using Task sequence in SCCM..can u help me here how to if you know about it..
- Stop the agent via command prompt
- Open agent.properties file and update the CAM IP to the VIP.
- Save it directly – if it is allowing us to save, we need to “save as” in C:desktop and replace the file under the agent path.
- Delete the data and log folder
- Restart the agent via command prompt.
Answers ( 5 )
I would also like to understand, why task sequence and why not simply an Application / Package
How many machines you have to make this changes to?
Stop the agent via command prompt
>> What’s the name of the service that this agent is running?
Open agent.properties file and update the CAM IP to the VIP.
>> Why don’t you simply create an updated file with correct IP or any other configuration and replace the file.
>> If you insist on updating the existing file, then can you share the file (if it’s not confidential) to have a look
Save it directly – if it is allowing us to save, we need to “save as” in C:desktop and replace the file under the agent path.
>> you can use COPY.exe / Robocopy / Xcopy to achieve this.
Delete the data and log folder
>> Can be achieved by Command or PowerShell.
Restart the agent via command prompt.
>> once we have the name of service, this can be easily achieved using net start or Start-Service command
As Jitesh mentioned you may have to explore some batch file or PS script which can do the task for you?
Also any specific reason you want to run this in TS ?
Additionally, i do not think you get the exact script path, this is very custom requirement for which you need to access some sample PS and modify accordingly.
Hello, Thank you for posting in HTMD Forum. Please keep question heading short 🙂
– You can create a batch file or powershell scripts to perform the mentioned operation, Test it manually before executing with SCCM.
Or Add Run Command line\Powershell script option from Task Sequence, provide command line – like for “stopping the agent” sc stop
Hi Jitesh,
Thanks for your swift response.
could you please share the script path or file if you have it .
You need to prepare the scripts based on your requirements. Do step by step! you will able to get this easily. you won’t get exact script as already stated by Guru.
-Stop Services (SC Stop )
-Delete logs or folders ( RD /S /Q “Folder Path”)
-Restart Services (sc start )
——You can write like this——