1

I have the following assignment: Our campus has a SQL database filled with printers. My job is to create a SharePoint list that printer constructors can use to read certain counters. This will be done using PowerShell.

Example: Constructor ABC wants to know the amount of pages printed on printer D between date F and date G. He can enter the name/serial no and date(s) on a SharePoint site, which will then display the number he is looking for.

I've received some example code to add items to a list in PowerShell, but the whole process is lost on me. I know some basic things but all in all I'm still a beginner when it comes to SharePoint and PowerShell.

I'm looking for some general guiding steps to complete this assignment, e.g. "first, write this and then link this,...", so I can plan the assignment accordingly.

This question might be too vague and might not belong here, but trying never hurt anyone!

Thanks, Stu

1

Use below link to import sql server data to SPList:

http://www.sharepointdiary.com/2016/02/insert-data-from-sql-server-to-sharepoint-list-using-powershell.html

Once you have data into SPList, then data can be filtered based on any condition.

  • This is for SP Online, correct? I'm using SP 2013 and your provided method does not seem to work, because I can't use 'Get-SPWeb'. – Lightninstu Apr 3 '18 at 12:24
  • Why can't you use Get-SPWeb? This is available in SP2013. – Deepmala Apr 5 '18 at 13:30
  • I always get the following error: 'Get-SPWeb : The term 'Get-SPWeb' is not recognized as the name of a cmdlet, function, script file, or operable program....' when I use the code the link provides. – Lightninstu Apr 6 '18 at 7:37
  • Add-PSSnapin Microsoft.SharePoint.PowerShell in powershell – Deepmala Apr 6 '18 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.