We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

store incoming data to SQLRSS

5 replies

Last post Mar 12, 2021 07:23 AM by samwu

‹ Previous Thread|Next Thread ›
  • store incoming data to SQL

    Mar 08, 2021 03:24 PM|sd400|LINK

    It has been a while since I have administered an IIS server. Im hoping someone can point me in the right direction.

    I have a number of powershell scripts that retrieve information from Active Directory. I would like to send the information to an IIS server and have it stored into an SQL server. I can export the data from powershell to CSV, XML, etc.

    Are there any samples that show how to set up IIS for authentication, accept the incoming data, and send to SQL?

    I have powershell experience, SQL experience, and IIS experience. Im just tyring to put them all together. 

    Let me know if there is a better forum I should be posting this question to.

    Thanks for the help. 

  • Re: store incoming data to SQL

    Mar 09, 2021 06:42 AM|samwu|LINK

    Hi sd400,

    sd400

    Are there any samples that show how to set up IIS for authentication, accept the incoming data, and send to SQL?

    According to your description, I couldn’t understand your requirement clearly.

    What way do you want to store incoming data to sql? iis or powershell? or other?

    Have you any try? and do you want to manage authentication to sql server in powershell?

    if so, you can refer to this link: https://docs.microsoft.com/en-us/sql/powershell/manage-authentication-in-database-engine-powershell?view=sql-server-ver15.

    If I misunderstand your requirement, please post more details information about your requirement.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: store incoming data to SQL

    Mar 09, 2021 12:05 PM|sd400|LINK

    Hi Sam,

    Thanks for the response. 

    I have powershell scripts that gather data. I want to use Powershell to send that data to an IIS server. Then I would like to have the IIS server store the data in an SQL database. 

    I did find a youtube series on creating a web API project using visual studio. It seems like a good first step.

    If you know of other resources or sample scripts that may help me get started, I would appreciate any suggestions. 

    Thanks again,

    Steve

  • Re: store incoming data to SQL

    Mar 10, 2021 08:11 AM|samwu|LINK

    Hi sd400,

    sd400

    I have powershell scripts that gather data. I want to use Powershell to send that data to an IIS server. Then I would like to have the IIS server store the data in an SQL database. 

    IIS is a flexible, general-purpose web server from Microsoft to serve requested HTML pages or files. The IIS web server accepts requests from remote client computers and returns the appropriate response.  IIS server cannot store and send data, you can only do it by deploying the project to IIS. 

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
  • Re: store incoming data to SQL

    Mar 11, 2021 07:30 PM|sd400|LINK

    Sam,

    Thanks again for the response. I may not have articulated my question clearly.

    I have found many examples of what I was looking for. There are tons of YouTube videos and creating asp.net websites that connect to SQL. Tim Corey has lots of great videos using visual studio.

    Powershell has an "invoke-webrequest" command that will allow to send a Post method to the asp.net website.

    So, I should be able to place the data im gathering using Powershell into a hashtable. Then, use the invoke-webrequest to submit the data to the asp.net website, which will then store the data in an SQL table. The idea is to be able to run the powershell scripts at multiple locations. Gather local data from AD, and submit to a web server at a central site.

    We can then use Word, or Excel, or many other choices to create an easy to use dashboard.

  • Re: store incoming data to SQL

    Mar 12, 2021 07:23 AM|samwu|LINK

    Hi sd400,

    sd400

    Thanks again for the response. I may not have articulated my question clearly.

    I have found many examples of what I was looking for. There are tons of YouTube videos and creating asp.net websites that connect to SQL. Tim Corey has lots of great videos using visual studio.

    Powershell has an "invoke-webrequest" command that will allow to send a Post method to the asp.net website.

    So, I should be able to place the data im gathering using Powershell into a hashtable. Then, use the invoke-webrequest to submit the data to the asp.net website, which will then store the data in an SQL table. The idea is to be able to run the powershell scripts at multiple locations. Gather local data from AD, and submit to a web server at a central site.

    We can then use Word, or Excel, or many other choices to create an easy to use dashboard.

    ok, If you get any problems during this process, please come and ask.

    Best regards,

    Sam

    IIS.NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today. Learn more >
‹ Previous Thread|Next Thread ›