sudo /Applications/Install\ macOS\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Yosemite --application-path /Applications/Install\ macOS\ Yosemite.app --nointeraction Replace /Volumes/Yosemite with your desired USB drive or disk. This command creates a bootable USB drive, not an ISO.
For an ISO, consider converting the installer to an ISO image using third-party tools like hdiutil (built-in to macOS): mac os x yosemite iso download
a. After downloading Yosemite from the App Store, it usually goes to your Applications folder. Right-click (or Ctrl+click) on it and select "Show Package Contents." sudo /Applications/Install\ macOS\ Yosemite
b. You can use tools like createinstallmedia command-line tool or third-party software to create a bootable installer. Here’s a basic command example: not an ISO. For an ISO