knarrstudio / itps.omcs.tools Goto Github PK
View Code? Open in Web Editor NEWNew ITPS Tools
License: MIT License
New ITPS Tools
License: MIT License
Is your feature request related to a problem? Please describe.
After switching from Dell (Lexmark) to HP the "Status" doesn't change. Since the rest of the tests are "ping" tests make this one too.
Describe the solution you'd like
Find the port that is assigned to the printer (the actual print device) and ping it.
Describe alternatives you've considered
None
Additional context
None at this time.
Is your feature request related to a problem? Please describe.
Not really
Describe the solution you'd like
Make a CSV output file that can be used for trending.
Describe alternatives you've considered
Manipulating the log file with Python to get trending.
Additional context
Requesting for a friend
Added PingStat hashtable and ColumnNames for comparing the current file header, with what is in Sites.
$TimeStamp = Get-Date -Format G
$Sites = @('localhost', 'www.google.com', 'www.bing.com', 'www.cnn.com', 'www.yahoo.com', 'random', '192.168.1.3')
$PingStat = [Ordered]@{
'DateStamp' = $TimeStamp
}
$columns = @()
$PingReport = 'C:\temp\Reports\Ping.csv'
$PingReportInput = Import-Csv $PingReport
$ColumnNames = ($PingReportInput[0].psobject.Properties).name
foreach($site in $Sites)
{
Write-Verbose -Message "1. $site"
if(! $ColumnNames.contains($site))
{
Write-Verbose -Message "2. $site"
$PingReportInput | Add-Member -MemberType NoteProperty -Name $site -Value $null -Force
$PingReportInput | Export-Csv $PingReport -NoTypeInformation
}
}
This is done as a job in this one. This script will run on it's own.
$job = Test-Connection -ComputerName $Sites -AsJob -Count 1 #-BufferSize 1024
if ($job.JobStateInfo.State -ne 'Running')
{
$Results = Receive-Job $job
}
Builds the hashtable that will be used to populate the row. We could add each test to the file, but that would create a lot of white space. This builds that hash and then sends the hash to the file as a single row.
foreach ($Item in $Results)
{
$Target = $Item.Address
$TimeMS = $Item.ResponseTime
$PingStat[$Target] = [string]$TimeMS
}
Not much to say about this, but it could be a small function
$PingStat |
ForEach-Object -Process {
[pscustomobject]$_
} |
Export-Csv -Path $PingReport -NoTypeInformation -Force -Append
Everything tested okay at home, brought to the office and it wouldn't display.
Start-DailyChecks.ps1
MyLocalParameters.txt
I am now thinking that it might be better to add a param such as $ConfigFile that will point to a file that can be read per script rather than for all scripts. That way they can be more modular.
Is your feature request related to a problem? Please describe.
Get-Help Get-InstalledSoftware
It is not robust enough.
It doesn't have examples or a full description.
Describe the solution you'd like
Update the Comment Help
Was attempting to use this yesterday on a 2008 server and it kept kicking out an error.
Since, I was able to access the same files through a share, I completed it there, and since the 2008 server is going away, I am not going to worry about this too much. I just want it documented.
Describe the bug
The term 'f_$OutputTable.Report' is not recognized as the name of a cmdlet, function, script file, or operable program.
To Reproduce
Steps to reproduce the behavior:
The Ping-O-Matic Fiber Tester!
Round Trip Time is GOOD!
f_$OutputTable.Report : The term 'f_$OutputTable.Report' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the name, or if a
path was included, verify that the path is correct and try again.
At C:\Users\erika\Documents\WindowsPowerShell\Modules\ITPS.OMCS.Tools\1.11.1.7\Modules\Connectio
nsModule.psm1:416 char:9
~~~~~~~~~~~~~~~~~~~~~
Expected behavior
No message
Allow files to point to a single output file for ease of reporting.
Create a param that will indicate that the script should only output to a .log, .txt, or .csv file (or other format).
Once the param is set then the console should not display any output.
Describe the bug
Repair-WindowsUpdate sends all sorts of errors to the console, if you are not an admin.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should give a "pretty" error message to warn the user they need admin rights
Additional context
Add any other context about the problem here.
Describe the bug
est-Replication : Cannot validate argument on parameter 'TestFile'. The argument "\folder-1\test.txt" does not match
the "
\\.txt
" pattern. Supply an argument that matches "
\\.txt
" and try the command again.
At line:1 char:60
~~~~~~~~~~~~~~~~~~~~
Describe the bug
The math fails when $math*x
To Reproduce
Steps to reproduce the behavior:
Run the script with or without the $test param. It will error out as $time*2 not authorized.
Expected behavior
The script should "Sleep" for $time*x time based on whether the $test param is in place
Change the $time variable on lines 70 and 75 to:
[int]$time = 5
[int]$time = 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.