Place the trivet into the Instant Pot and fill with 4 cups of water. Place a baking pan inside and set the Instant Pot to the SAUTE setting.
While the water is heating whisk together the milk, sugar, heavy cream, eggs, vanilla extract and nutmeg until incorporated.
Pour mixture into the baking pan and add the cinnamon sticks and star anise.
Cook, stirring or whisking constantly for 15-20 minutes or until the eggnog has thickened and reached 160 degrees.
Turn off the Instant Pot and carefully remove the eggnog. Allow to cool slightly then pour into a clean jar or airtight container, seal and chill in the refrigerator until completely cooled. NOTE: it will thicken slightly as it cools.
Serve cold or rewarm
Notes
Use an instant read food thermometer to monitor the eggnog temperature until it reaches 160 degrees. This is the temperature at which eggs are cooked and there are no concerns about the eggs being raw.Serve it warm or cold or even chilled over ice!Storing itStore in a sealed jar or airtight container for up to 3 days.