Set Sharing Name, Hostname and Local Subnet Name To [PREFIX]-[SERIAL#]-[SUFFIX] - Mac
| 0 Votes |
Description
This Fixlet prompts the TEM console for a Prefix and Suffix to use in the computer name. It then sets the sharing, host and local subnet names to [Prefix]-serialnumber-[Suffix]. If you leave the Prefix or Suffix blank it will skip the related hyphen.
By making these names all match computers should appear in SEP and Secunia using their Sharing Name.
Property Details
| 3648 | |
| Beta - Preliminary testing ready for more | |
| Set Sharing Name, Hostname and Local Subnet Name To [PREFIX]-[SERIAL#]-[SUFFIX] - Mac | |
| BESC | |
| Internal | |
| 4/6/2012 12:00:00 AM | |
| Mac, sharing, host, local subnet, hostname, name | |
| kerryt9455 on 10/24/2013 7:24:52 AM | |
| kerryt9455 on 10/24/2013 7:24:52 AM | |
| 4424 Views / 42 Downloads | |
* Average over 0 ratings.
** Log In or Register to add your rating.
|
Relevance
name of operating system = "Mac OS X"
Actions
Action 1 (default)
Action Link Click
here to deploy this action.
Script Type
BigFix Action Script
action parameter query "Prefix_Name" with description "Please enter the name Prefix (optional)"
action parameter query "Suffix_Name" with description "Please enter the name Suffix (optional)"
parameter "compName" = "{string "IOPlatformSerialNumber" of dictionary of service plane of iokit registry}"
if {not (parameter "Prefix_Name" of action = "")}
parameter "compName2" = "{parameter "Prefix_Name" of action}-{parameter "compName"}"
else
parameter "compName2" = "{parameter "compName"}"
endif
if {not (parameter "Suffix_Name" of action = "")}
parameter "compName3" = "{parameter "compName3"}-{parameter "Suffix_Name" of action}"
else
parameter "compName3" = "{parameter "compName2"}"
endif
wait sh -c "scutil --set ComputerName {parameter "compName3"}"
wait sh -c "scutil --set HostName {parameter "compName3"}"
wait sh -c "scutil --set LocalHostName {parameter "compName3"}"
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
| Social Media: |

