前回は、テキストファイルを加工してCSVファイルを出力する例を紹介しました。元になるデータがPowerShellのオブジェクトであれば、Export-Csv(省略形epcsv)コマンドレットを使って簡単にCSVファイルを作成できます。 Export-Csvの書式は以下の通りです。 Export-Csv ...
$data="name,price" $data >> .\test.csv $data="えんぴつ,100円" $data >> .\test.csv $data="消しゴム,50円" $data >> .\test.csv カンマ区切りのCSV ...
前にもCSVの記事を投稿しましたがちょっと内容が薄すぎて見返すと使えなかったので書き直して再度投稿します。 PowerShellでCSVファイルを読込 コマンドレットImport-Csvを使うとCSVファイルが読み込めます Import-Csv -Path "C:\temp\test.csv" 配列に取り込むこともできます ...
前回の成果物「csv2barchart.ps1」は次の通りだ。 #!/usr/bin/env pwsh #===== # 引数を処理 # -CSVFile パス グラフのCSVデータファイルパス # -PNGFile パス 生成するPNG画像のファイルパス # -OutFile パス 中間生成されるHTML ...
# This PowerShell script will collect the Date of inventory, host name, IP/MAC, username (run as user), type, serial number, model, BIOS info, CPU, RAM, storage (OS drive), GPU(s), OS and version, up ...
# This PowerShell script will collect the Date of inventory, IP and MAC address, serial number, model, CPU, RAM, total storage size, GPU(s), OS, OS build, logged in user, and the attached monitor(s) ...
PowerShell is a powerful scripting language that allows system administrators to automate tasks. One such task is processing CSV files to extract, modify, or analyze data. In this blog, we'll walk ...
Windows PowerShell is probably best-known for its ability to allow Windows admins to operate at scale. For instance, it would take forever to create a thousand user accounts through the GUI, but ...
In this post we'll cover two quality-of-life improvements when processing data, one for big data and the other for time stamps. You can also read it on my blog https ...
Storing data in a structured way is important when that data will be read by a computer. One of the easiest ways to put data into an easy-to-read format is with a comma-separated value (CSV) file. A ...
I love using Import-CSV because anything you import will be converted into an object. The source of your CSV file can come from anywhere. It does not have to be created in PowerShell. This is ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する