Police officers were called out to 405 house parties across the country over the weekend following reports of breaches of coronavirus rules.
Six people were arrested and one fixed penalty notice was issued, Police Scotland said.
Other people attending the parties were given “suitable advice” and then dispersed.
Two officers who went to a house in Muirhouse, Edinburgh, were allegedly assaulted.
The windows of two police cars were also smashed during the incident at 05:35 on Sunday.
- New police powers to break up house parties
- New rules limit gatherings to six people
Two men, both aged 47, have been arrested and charged and are due to appear at Edinburgh Sheriff later.
Police Scotland also confirmed that officers responded to 1,552 reports of noise, public nuisance and disturbance between Friday and Sunday.
That was an increase of of 41% compared with the same weekend last year.
As of 9 September, there had been 294 arrests for Covid-related breaches and 3,388 fixed penalty notices issued.
Deputy Chief Constable Malcolm Graham said the force “will not tolerate blatant disregard for the legislation which is there to help stop the spread of the virus”.
“In some of the situations officers were assaulted, which is horrific,” he said. “Officers have been spat upon as well as physically assaulted in other ways.
“The law is really clear – you can’t have a party within your house and if you do we’re going to be called and we are going to take enforcement action to make sure you don’t repeat that.”
It was announced in August that Police Scotland would be given powers to break up and disperse house parties.
The move came amid concerns about links between large indoor gatherings and the spread of Covid-19 cases.
A new law came into force on Monday, limiting social gatherings in Scotland to a maximum of six people from two households.
Police Scotland said officers had been involved in 68,000 “interactions” with the public since lockdown rules were introduced.
Mr Graham added: “Our approach throughout the pandemic has been to engage with the public, explain the legislation and guidance, and encourage compliance, only using enforcement as a last resort.
“We will continue with that approach, but we will not hesitate to use enforcement action where it is necessary.
“We will not tolerate blatant disregard for the law, which is in place to help stop the spread of the virus, and we have been using our powers to disperse large groups of people at house parties.”