The court was hearing a PIL challenging her elevation as additional director to CBI on the ground that her name was not recommended by the selection committee.
A bench headed by Chief Justice R M Lodha also directed the Centre to produce the records pertaining to her appointment by July 14.
"We restrain her from functioning as additional director CBI. The respondent (govt) is also directed to submit the records relating to the appointment of the officer," the bench said.
Further, the bench also declined her counsel's submission that she should be allowed to function here as she has to take care of her ailing father.
To her another submission that this court's order should not have any impact on her merits, the bench said, "We have nothing to do with her merits. She may be a meritorious officer. We want to see only if her appointment was illegal or not."
Soon after she took over the charge in CBI, Ramasundaram was suspended by the Tamil Nadu government for allegedly for failing to obtain official consent.
In its order, the bench made CBI director Ranjit Sinha as party to the case and sought his response.
It followed government's submission that Sinha had supported her name in the place of R K Pachnanda for the post.
When the hearing began, the court asked solicitor general Mohan Parasaran, appeared for Central government, to clarify if the selection committee had not recommended her name for the post.
Replying to the query, the senior law officer informed the court that only one name R K Pachnanda, a West Bengal cadre officer, was recommended by the selection committee.
The bench said "If one name is recommended you have to give effect to that name. Who should decide the name ? It is only the committee. You could have asked the committee to redo the exercise. You are overriding the power of selection committee.How can you super impose your decision on the committee."
Ramasundaram was with the CBI from 1999-200 as Deputy Inspector-General and later as its first woman joint director and handled various cases pertaining to economic offences including the Telgi stamp scam.
She was posted as chairperson of the Tamil Nadu Uniformed Services Recruitment Board since 2012.
In the PIL, filed by journalist Vineet Narayan, it was alleged that the Centre has bypassed the statutory committee's recommendation for the appoint.
"The unanimous recommendation of the high powered statutory committee formed under the provision of Delhi Special Police Establishment (DSPE) Act for appointing Pachnanda for the post.... was turned down by the directorgovernment. Instead, appointed a person (Ramasundaram) whose name was not recommended by the comittee," the PIL said while describing the government act as "arbitrary".
Seeking quashing of Ramasundaram's appointment, the petitioner said there was clear violation of rules as Appointments Committee of Cabinet (ACC) headed by the prime minister had ignored a selection committee recommendation to appoint Pachnanda.
Even CVC has expressed its displeasure over her appointment.