Two GP practices in NHS Ayrshire and Arran were affected by the cyber attack on the NHS across the UK.
A spokesman declined to name the practices but added that services are now running as normal across NHS Ayrshire and Arran.
There is no evidence that patient records have been compromised.
NHS organisations in England, Wales and Scotland were affected to varying degrees by the attack which started on Friday.
John Wright, Director for Corporate Support Services for NHS Ayrshire and Arran said: “NHS Ayrshire & Arran can confirm that two GP practices have been affected. As a precaution, the practices were immediately disconnected from our network and we are in the process of checking and reconnecting the devices to the network. Our IT Security team is monitoring our systems and we will continue to do so over the coming days in order to minimise any possible impact on services. There is no evidence to suggest that patient details have been compromised and all our services are currently running as normal.”
Scottish Government Health Secretary Shona Robison said: “We are aware of a number of health boards affected by potential cyber incidents and the First Minister will chair a resilience meeting shortly.
“Scottish Government health officials are currently working closely with affected boards to assess the extent of the problem, and take steps to isolate affected systems, which have been affected by a Ransomware cyber-attack of the kind which has also affected health trusts in NHS England.