how to construct computers_group params in restricted software api

aaaaaa
New Contributor

i tried that:

<restricted_software>
	<general>
		<name>Restrict High Sierra</name>
		<process_name>Install macOS High Sierra.app</process_name>
		<match_exact_process_name>true</match_exact_process_name>
		<send_notification>true</send_notification>
		<kill_process>true</kill_process>
		<delete_executable>true</delete_executable>
		<display_message>High Sierra is not yet supported, check Self Service after public release.</display_message>
		<site>
			<id>-1</id>
			<name>None</name>
		</site>
	</general>
	<scope>
		<all_computers>false</all_computers>
		<computers/>
		<computer_groups>24</computer_groups>
		<buildings/>
		<departments/>
		<exclusions>
			<computers/>
			<computer_groups/>
			<buildings/>
			<departments/>
			<users/>
		</exclusions>
	</scope>
</restricted_software>

but it doesn't work

1 ACCEPTED SOLUTION

karthikeyan_mac
Valued Contributor

Hi @aaaaaa, You are missing the <computer_group> inside <computer_groups>.

 

<?xml version="1.0" encoding="UTF-8"?>
<restricted_software>
    <general>
        <id>1</id>
        <name>Restrict High Sierra</name>
        <process_name>Install macOS High Sierra.app</process_name>
        <match_exact_process_name>true</match_exact_process_name>
        <send_notification>true</send_notification>
        <kill_process>true</kill_process>
        <delete_executable>true</delete_executable>
        <display_message>High Sierra is not yet supported, check Self Service after public release.</display_message>
        <site>
            <id>-1</id>
            <name>None</name>
        </site>
    </general>
    <scope>
        <all_computers>false</all_computers>
        <computers/>
        <computer_groups>
            <computer_group>
                <id>9999</id>
            </computer_group>
            <computer_group>
                <id>10101</id>
            </computer_group>
        </computer_groups>
        <buildings/>
        <departments/>
        <exclusions>
            <computers/>
            <computer_groups/>
            <buildings/>
            <departments/>
            <users/>
        </exclusions>
    </scope>
</restricted_software>

 

 

View solution in original post

1 REPLY 1

karthikeyan_mac
Valued Contributor

Hi @aaaaaa, You are missing the <computer_group> inside <computer_groups>.

 

<?xml version="1.0" encoding="UTF-8"?>
<restricted_software>
    <general>
        <id>1</id>
        <name>Restrict High Sierra</name>
        <process_name>Install macOS High Sierra.app</process_name>
        <match_exact_process_name>true</match_exact_process_name>
        <send_notification>true</send_notification>
        <kill_process>true</kill_process>
        <delete_executable>true</delete_executable>
        <display_message>High Sierra is not yet supported, check Self Service after public release.</display_message>
        <site>
            <id>-1</id>
            <name>None</name>
        </site>
    </general>
    <scope>
        <all_computers>false</all_computers>
        <computers/>
        <computer_groups>
            <computer_group>
                <id>9999</id>
            </computer_group>
            <computer_group>
                <id>10101</id>
            </computer_group>
        </computer_groups>
        <buildings/>
        <departments/>
        <exclusions>
            <computers/>
            <computer_groups/>
            <buildings/>
            <departments/>
            <users/>
        </exclusions>
    </scope>
</restricted_software>