The courts have powers under various Acts of Parliament to issue a warrant or written authority for the police or other government officials to enter buildings or other property to make arrests, or to investigate or prevent various offences, or to obtain evidence or information.
For example:
the Search and Surveillance Act 2012
the Fisheries Act 1996
the Tax Administration Act 1994, and
the Mental Health (Compulsory Assessment and Treatment) Act 1992.
Other state officials, like Customs Officers and Fisheries Officers, also have search powers.