locked
Powershell Upload Data without SQL RRS feed

  • Question

  • Hi,

    I'm currently doing a script that is reporting on a server but we do not have SQL installed nor do we have the possibility of installing SQL at present, is it possible to store data in a text file or xml file and get powershell to compare the data.

    For example the main purpose of this is every month it will report disk space and what i would like is it to check a file for previous data and show the growth.

    Unfortunately every time i search for something it's always people giving examples of SQL so just wondering if anyone has some examples they can share.

    Thanks

    Alex

    Tuesday, February 11, 2014 10:52 PM

Answers

  • Yes - why wouldn't you be able to store things in a text file.  That is what we do all the time.

    In PowerShell we can store data as XML and compare it.  Start by leaning the basics of PowerShell.  The rest will come as you learn.


    ¯\_(ツ)_/¯

    Tuesday, February 11, 2014 11:17 PM

All replies

  • Yes - why wouldn't you be able to store things in a text file.  That is what we do all the time.

    In PowerShell we can store data as XML and compare it.  Start by leaning the basics of PowerShell.  The rest will come as you learn.


    ¯\_(ツ)_/¯

    Tuesday, February 11, 2014 11:17 PM
  • BTW: SQL is probably also an option, even without SQL installed, e.g. with SQL Compact Edition.

    But it's by far not native way of exporting/ importing data from/ to PowerShell. We use CliXml, Csv and from v3 JSON for that:

    Get-Command -Noun Clixml, Csv, Json

    That should get you started.

    Sunday, February 16, 2014 2:38 PM