Complex sentence: The Queen's Representative serves as the viceroy of the Cook Islands and the governor-general of New Zealand, represented by the State Services Commissioner, represents the Queen in Niue, carrying out all the monarch's constitutional and ceremonial duties of state on her behalf.
Split into simpler sentences: The Queen's Representative serves as the viceroy of the Cook Islands. The governor-general of New Zealand (represented by the State Services Commissioner) represents the Queen in Niue, carrying out all the monarch's constitutional and ceremonial duties of state on her behalf.