patron
asked on
Script to automate weekly /monthly performance monitoring Report in excel
Looking for Script/Free tool to to automate weekly /monthly email Report in excel format
Where we need Servers Availability Report including OS Type , Service status ,CPU ,Memory ,Page File ,Disk utilization
with Last Reboot Tracking
Please advice for best solution to be implemented without Cost if possible.
Thanks in Advance
Where we need Servers Availability Report including OS Type , Service status ,CPU ,Memory ,Page File ,Disk utilization
with Last Reboot Tracking
Please advice for best solution to be implemented without Cost if possible.
Thanks in Advance
ASKER
Thanks David,
any possibility if we can have separate script /solution for same ?
any free tool for such automation ?
any possibility if we can have separate script /solution for same ?
any free tool for such automation ?
are you looking for an Exchange report?
ASKER
No ,we are looking for our infra running in a domain with 80% windows and 20 % linux machines.
Will be great if we can achieve the same for windows server machines in domain like 2003 ,2008.2016.2019
Or if max we can fetch from VMware vCenter ?
Will be great if we can achieve the same for windows server machines in domain like 2003 ,2008.2016.2019
Or if max we can fetch from VMware vCenter ?
This might be useful
Computer Audit with Powershell
https://www.experts-exchange.com/articles/33488/Computer-Audit-with-Powershell.html
Computer Audit with Powershell
https://www.experts-exchange.com/articles/33488/Computer-Audit-with-Powershell.html
ASKER
Not able to run it and can we get the extract for all server in domain but not for dc only ?
Upgrade to Powershell 5. You can run against all computers
ASKER
I do have PowerShell 5 installed
Name Value
---- -----
PSVersion 5.1.14393.3053
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3053
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name Value
---- -----
PSVersion 5.1.14393.3053
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3053
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
ASKER
please assist if we can achieve the requested data for all boxes
in domain
in domain
ASKER
@Shaun Vermaak , please help as am getting blank report with ps version as mentioned above ?
The 'class' keyword is not supported in this version of the language
Very strange indeed. Please send full error
ASKER
At line:2 char:1
+ class Computer
+ ~~~~~
The 'class' keyword is not supported in this version of the language.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
+ PSComputerName XXYYZZ5
Get-Get-Content : Cannot bind argument to parameter 'Path' because it is null.
At C:\ABC\XYZ\Audit.ps1:56 char:41
+ $latestComputerAudit = Get-Content $latestFile | ConvertFrom-Jso ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidation Exception
+ FullyQualifiedErrorId : ParameterArgumentValidatio nErrorNull NotAllowed ,Microsoft .PowerShel l.Commands .GetConten tCommand
Test-DnsServer : The term 'Test-DnsServer' 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:\ABC\XYZ\Audit.ps1:97 char:13
+ $dnsTest = (Test-DnsServer -IPAddress $DomainController.IPv4Addr ess). ...
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Test-DnsServer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
report.JPG
+ class Computer
+ ~~~~~
The 'class' keyword is not supported in this version of the language.
+ CategoryInfo : ParserError: (:) [], ParseException
+ FullyQualifiedErrorId : ReservedKeywordNotAllowed
+ PSComputerName XXYYZZ5
Get-Get-Content : Cannot bind argument to parameter 'Path' because it is null.
At C:\ABC\XYZ\Audit.ps1:56 char:41
+ $latestComputerAudit = Get-Content $latestFile | ConvertFrom-Jso ...
+ ~~~~~~~~~~~
+ CategoryInfo : InvalidData: (:) [Get-Content], ParameterBindingValidation
+ FullyQualifiedErrorId : ParameterArgumentValidatio
Test-DnsServer : The term 'Test-DnsServer' 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:\ABC\XYZ\Audit.ps1:97 char:13
+ $dnsTest = (Test-DnsServer -IPAddress $DomainController.IPv4Addr
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Test-DnsServer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
report.JPG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
For example, OS type only changes when a machine or a container is installed, so once during it's lifetime.
Memory usage relates to processes which start, then die.
CPU usage relates to processes which start, then die... also long running Kernel threads.
Paging + Disk Utilization are also very different.
Better to just log all your data into a text based log file, as trying to write Excel data natively can be massively slow + could produce such high over head as to skew your actual data, like CPU usage or disk utilization... as writing Excel data is complex, because of the files internal structure, which is very different than plain text files.
One approach...
1) Log each set of data to a text based log file.
2) Rotate the log files at midnight (logrotate does this on every Linux machine).
3) After rotation is finished + new data is now logging to the next text file, transform the previous log file into an Excel file.