Can't find the ps module. I need to install it so I can import PDQ module

This is the case I'm after. I want to use something similar to this code to get PDQ inventory to run a report daily since I guess theres no way to schedule report runs?

 

Anyway, I can't find the PS module. Like you know how you can install Active Directory PS module so you have all the commands...

I can't find it anywhere, where is it? Is there such a thing? Is this possible?

 

# Import the PDQ Inventory module
Import-Module -Name PDQInventory

# Set the API credentials
$apiKey = "YOUR_API_KEY"
$apiUrl = "http://your_pdq_inventory_server:9696"

# Set the report ID and output file path
$reportId = "YOUR_REPORT_ID"
$outputFilePath = "C:\Path\to\output.csv"

# Connect to the PDQ Inventory API
Connect-PDQInventory -ApiKey $apiKey -ApiUrl $apiUrl

# Run the report and export as CSV
Invoke-PDQInventoryReport -ReportId $reportId -ExportCsv $outputFilePath

# Disconnect from the PDQ Inventory API
Disconnect-PDQInventory

0

Comments

1 comment
Date Votes

Please sign in to leave a comment.

Didn't find what you were looking for?

New post