Siman 384
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א עַכּוּ"ם הַנִּכְנָס לְשֵׁם אַכְסְנָאוּת, אִם נִכְנָס שֶׁלֹּא בִּרְשׁוּת אֵינוֹ אוֹסֵר לְעוֹלָם. וְאִם נִכְנָס בִּרְשׁוּת, אִם הוּא רָגִיל לָבֹא, אוֹסֵר מִיָּד; וְאִם אֵינוֹ רָגִיל, אֵינוֹ אוֹסֵר עַד לְאַחַר שְׁלֹשִׁים יוֹם.
1 A Non-Jewish Guest, Whether He Prevents [Carrying]. Containing 2 paragraphs: A non-Jew who enters as a guest: if he entered without permission, he never prevents [carrying]. If he entered with permission — if he regularly comes, he prevents [carrying] immediately. If he does not regularly come, he does not prevent [carrying] until after thirty days.
ב אַנְשֵׁי חֵיל הַמֶּלֶךְ שֶׁנִּכְנְסוּ בְּבָתֵּי הַיְּהוּדִים, בֵּין בְּחָזְקָה בֵּין בְּרָצוֹן, אִם יֵשׁ לְבַעֲלֵי בָּתִּים בְּאוֹתָן מְקוֹמוֹת שֶׁנִּכְנְסוּ הָעַכּוּ"ם כֵּלִים שֶׁאָסוּר לְטַלְטְלָם בְּשַׁבָּת, אֵינָם אוֹסְרִים עֲלֵיהֶם.
2 The king's soldiers who entered into the homes of Jews, whether by force or willingly — if the homeowners have in those places where the non-Jews entered utensils that are forbidden to move on Shabbat, [the non-Jews] do not prevent [carrying] upon them.