Feature Update Install with Tracking (Reset Custom Fields)
Summary
The script clears the related custom fields on machines where the Feature Update is successfully installed, thereby excluding those machines from automation and monitoring.
Sample Run
Dependencies
- Task - Feature Update Install With Tracking
- Custom Field - WinFeatUpgradeAttempts
- Custom Field - Feature Update Install Failure
- Custom Field - Feature Update Reboot Pending
- Device Group - Feature Pack Update - Updated Computers
Create Script
Create a new Script Editor
style script in the system to implement this task.
Name: Feature Update Install with Tracking (Reset Custom Fields)
Description: Reset the values of the Feature Update Install Failure, Feature Update Reboot Pending, and WinFeatUpgradeAttempts Custom Fields for Windows 10 and Windows 11 computers that are already on the latest build version.
Category: Patching
Script
Start by adding a row. You can do this by clicking the Add Row
button at the bottom of the script page.
Row 1 Function: Set Custom Field
Search and select the Set Custom Field
function in the new row.
Search and select the WinFeatUpgradeAttempts
Custom Field.
Type
(there is a single space) in the Value
box and click the Save button.
Row 2 Function: Set Custom Field
Insert a new row by clicking the Add Row
button.
Search and select the Set Custom Field
function in the new row.
Search and select the Feature Update Reboot Pending
Custom Field.
Type False
in the Value
box and click the Save button.
Row 3 Function: Set Custom Field
Insert a new row by clicking the Add Row
button.
Search and select the Set Custom Field
function in the new row.
Search and select the Feature Update Install Failure
Custom Field.
Type
(there is a single space) in the Value
box and click the Save button.
Click the Save
button to save the task.
Completed Script
Deployment
- Go to
Automation
>Tasks
. - Search for
Feature Update Install With Tracking (Reset Custom Fields)
task. - Select the concerned task.
- Click on the
Schedule
button to schedule the task/script.
- This screen will appear.
- Click the
Does not repeat
button.
- This pop-up box will appear.
- Click the
OK
button to run the task once per day.
- Select the relevant time to execute the script. It is suggested to run this task during working hours when most of the workstations are online.
- Search and select the
Feature Pack Update - Updated Computers
group in theResources
.
- Clicking the
Run
button will initiate the schedule.
- The task will start appearing in the Scheduled Tasks.
- The
Suspend
option can be used tosuspend/stop
the schedule.
Output
- Custom Field