• Call Toll Free: 1-855-909-3300

How To Fetch a User’s ID In Microsoft SharePoint With Help Of PowerShell?

Understanding the manner in which PowerShell helps to access SharePoint sites makes you confident about accessing the SharePoint data quickly & efficiently. PowerShell has a lot more for SharePoint and that includes its ability to fetch a user’s ID.

In this blog post, we will discuss the procedure to fetch User ID using PowerShell for SharePoint 2010 or 2013.

Host your Accounting Software in secured Cloud

Some Quick Facts about PowerShell…

It is quite evident that deploying PowerShell does not mean ignoring the security concerns in SharePoint. The “Inventorying SharePoint Using PowerShell” signifies the basic security necessities. You must go through the permissions as mentioned on the content and further explore it more.

Additionally, you must be a member of the “SharePoint_Shell_Access” role for the specific databases with that content. You can run PowerShell in form of a site collection administrator to each site collection by adding the account you are deploying.

Running the PowerShell scripts can attract heavy load on a server, hence it is recommended to run these scripts during non-working hours. Following are some commands and their purpose in PowerShell –

SharePoint

Attractive Plans Available for Application Hosting

Deploying PowerShell for Fetching User’s ID in SharePoint…

You may need to run a script in order to update specific information. At times, while running the script, you may come across complain about the ID being used. If you just require viewing the internal fields for the time being, it would be suffice to pick any one ID at random.

However, using the SharePoint UI to fetch the User’s ID is not that simple as it may seem in real. Among the different solutions available for fetching the user ID, lengthy scripts and coding is an essential part of most that may render the task a bit challenging.

Deploying PowerShell by using few valid commands can help you avoid all such challenges. Simply follow the steps mentioned below for fetching User ID with help of PowerShell –

  • Go to the PowerShell Window
  • Use following command

 

Get-SPUser -Web http://URLtoSharePointSite -Identity “domainusername” | ft ID

Please note that above command will simply fetch the ID of the user. However, if your also need the name of the user, you can add the same after the “|” symbol in the command as shown below –

Get-SPUser -Web http://URLtoSharePointSite -Identity “domainusername” | ft Name, ID

With SharePoint Server 2013, PowerShell version 3.0 is available. If you want to see your PowerShell’s current version, use the following command –

SharePoint2

For sure, following the method as discussed above for PowerShell will help you fetch User ID, name and other relevant information you require in SharePoint.

Leave a Reply

Techarex NetWorks Products