How do I run a CMD command on a sharepoint server

Joshua Lebreton 0 Reputation points
2023-03-09T21:14:26.0133333+00:00

I am trying to run a CMD command on a SharePoint server to get its file structure (xcopy) but I cannot find any information on how to direct my cmd command at the SharePoint. I have admin access to the SharePoint, but the file server is on Microsoft's server.

So how would I go about running a CMD command to SharePoint without using Power Automation. I can use Power Shell if there is a similar command there, but I still don't know how to contact the SharePoint server.

Microsoft 365 and Office SharePoint Server For business
Microsoft 365 and Office SharePoint For business Windows
{count} votes

1 answer

Sort by: Most helpful
  1. Xyza Xue_MSFT 30,176 Reputation points Microsoft External Staff
    2023-03-10T08:24:10.76+00:00

    Hi @Joshua Lebreton ,

    Do you want to xcopy the file structure in the SharePoint server library to another server? We need to map to the network drive first, and then xcopy. The file server on Microsoft's server is in another domain, right? If it is not a server in the same domain, I suggest you look for a third-party tool to see if this function can be realized.

    About map SharePoint as a network drive, please refer to: https://learn.microsoft.com/en-us/answers/questions/614462/linking-sharepoint-site-to-a-network-drive


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.