Yes, the audience, even if seeing the play for the first time, knows that it is Portia and Nerissa entering the courtroom disguised as men. We know this because Portia reveals her plan to disguise herself as a man to Nerissa in Act 3. Portia says that she will carry a dagger:
And speak between the change of man and boy
With a reed voice, and turn two mincing steps
Into a manly stride, and speak of frays ...
Portia, in other words, says she will talk like a teenaged boy, walk with a manly stride, and speak, as a man would, of fighting. She says she knows many "raw tricks" about bragging like a man, showing she has been a keen observer of male behavior. Nerissa then asks:
Why, shall we turn to men?
This is an example of dramatic irony
. Dramatic irony occurs when the audience knows something characters
in a play do not. The audience recognizes when the lawyer and clerk enter the courtroom that they are Portia and Nerissa, but none of the men in the court have any idea of what is going on.