Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
VikasSukhija authored Jun 19, 2023
1 parent 326b4cf commit f22b48e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions printersreport.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<#PSScriptInfo
.VERSION 1.0
.VERSION 1.1
.GUID 5bbe6009-817a-49f5-afb0-c9e328e49131
.GUID ff5e9b3e-3968-4876-95ac-f23adbbb37ba
.AUTHOR Vikas Sukhija
Expand Down Expand Up @@ -51,7 +51,7 @@ $Report = Write-Log -Name "Report-printersreport" -folder "Report" -Ext "csv"
#######################get report based on days#########################
Write-Log -Message "Start....................Script" -path $log
try{
$printers = Get-ADObject -LDAPFilter "(objectCategory=printQueue)" -Properties cn, drivername, location, printername, portname, servername | select portname, cn, drivername, location, printername, servername
$printers = Get-ADObject -LDAPFilter "(objectCategory=printQueue)" -Properties cn, drivername, location, printername, portname, servername | select cn, drivername, location, printername, servername, @{n="portname";e={$_.Portname}}
Write-Log -Message "Fetched all printers - $($printers.count)" -path $log
$printers | Export-Csv $Report -NoTypeInformation
Write-Log -Message "Exported report to CSV" -path $log
Expand Down

0 comments on commit f22b48e

Please sign in to comment.