AIS should always be in operation when ships are underway or at anchor. If the master believes that the continual operation of AIS might compromise the safety or security of his/her ship, the AIS may be switched off. This might be the case in sea areas where pirates and armed robbers are known to operate. Actions of this nature should always be recorded in the ship’s logbook together with the reason for doing so. The master should however restart the AIS as soon as the source of danger has disappeared. If the AIS is shut-down, static data and voyage related information remains stored. Restart is done by switching on the power to the AIS unit. Ship’s own data will be transmitted after a two minute initialization period. In ports AIS operation should be in accordance with port requirements.

Source : MSC Resulution_A.917(22)