JAMF HOST NAME

#!/usr/bin/env bash

# Get the Serial Number of the Machine
sn=$(system_profiler SPHardwareDataType | awk '/Serial/ {print $4}')

# Set the ComputerName, HostName and LocalHostName
scutil --set ComputerName $sn
scutil --set HostName $sn
scutil --set LocalHostName $sn

Comments

Popular posts from this blog

What’s the Difference Between APFS, Mac OS Extended (HFS+), and ExFAT?

Is It Possible Not to Convert to APFS When Upgrading to High Sierra?