Tag Archives: Need

Implement simple server monitoring with PowerShell

As your server inventory expands, you will need assistance to ensure you can head off any problems.

There are many server monitoring and reporting options in the market, but certain situations may call for a lightweight solution. Monitoring with PowerShell is a way to use the native functionality in Windows to create scripts that check your systems and send regular updates.

This article explores how to create a simple framework for Windows Server checks with the added benefit of generating reports at different intervals to assist with your monitoring efforts. While PowerShell 7 is available, this tutorial is based on Windows PowerShell 5.1 due to the ease of its default PowerShell remoting setup process.

Server monitoring with PowerShell

While there are many server checks you can perform, this article will concentrate on just a few to demonstrate the capabilities of a simple PowerShell monitoring framework. This tutorial will cover:

  • Disk space. Checking local disks and triggering a warning if the percentage of free space goes below 10%.
  • OS version. Checking if the version number is lower than 6.2. If it is, then the server OS predates Windows Server 2012, 2016 and 2019 and is no longer supported by Microsoft.
  • Expiring certificates. Compile a list of certificates that are within 30 days of expiration.
  • License usage. Check licensed states and report any that are unlicensed.

Script structure for server monitoring with PowerShell

The overall idea behind this server monitoring framework is to run a series of checks on one or more servers, save the results and then review the findings. To do this, we will create functions in the PowerShell script.

  • Invoke-ServerCheck. This function will take in a series of checks and computers to run those scripts against, then export the results to an XML file.
  • New-ServerReport. This function will take the XML files and generate different formats based on the requested report type, either daily or monthly.

Constructing the server checks

There are many ways to structure a potential script to do server checks, but this tutorial will place all checks in a hashtable that uses scriptblocks, which makes it easy to run the code on the requested computers, either local or remotely.

Additionally, the script uses a condition key and associated scriptblock to report whether the check has passed or failed. Every condition should return a Boolean value.

Adding new checks is as easy as adding a new top-level key with a sub-key of check and condition. Both are scriptblocks run by Invoke-Command within the Invoke-ServerCheck function.

$Checks = @{
'OSVersion' = @{
'Check' = {
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, Version, ServicePackMajorVersion, OSArchitecture
}
'Condition' = {$_.Version -LT 6.2}
}
'Certificates' = @{
'Check' = {
Get-ChildItem -Path 'Cert:' -Recurse -ExpiringInDays 30 | Select-Object Subject, NotAfter
}
'Condition' = {$Result.Count -GT 0}
}
'DiskSpace' = @{
'Check' = {
Get-CIMInstance -Class 'Win32_logicaldisk' -Filter "DriveType = '3'" | Select-Object -Property DeviceID, @{L='FreeSpaceGB';E={"{0:N2}" -f ($_.FreeSpace /1GB)}}, @{L="Capacity";E={"{0:N2}" -f ($_.Size/1GB)}}
}
'Condition' = { ($Result | Where-Object { (($_.FreeSpaceGB / $_.Capacity) * 100) -LT 10 }).Count -GT 0 }
}
'License' = @{
'Check' = {
Enum Licensestatus {
Unlicensed = 0
Licensed = 1
OOBGrace = 2
OOTGrace = 3
NonGenuineGrace = 4
Notification = 5
ExtendedGrace = 6
}

Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL" | Select-Object Name, ApplicationId, @{N='LicenseStatus'; E={[LicenseStatus]$_.LicenseStatus} }
}
'Condition' = {($Results | Where-Object LicenseStatus -NE 'Licensed').Count -EQ 0}
}
}

How the Invoke-ServerCheck function works

The Invoke-ServerCheck function handles the bulk of the server monitoring with PowerShell. This function takes in an array of checks from the $Checks variable, then each set of checks will be run across the servers or the local computer.

The script executes the following steps:

  1. iterates over each check in the $Checks variable;
  2. runs Invoke-Command on the scriptblock from the Checks key;
  3. stores the result in a $CheckResults variable; and
  4. saves the XML of the $Output variable to the requested path, which allows for easier manipulation of this variable in later functions.
Function Invoke-ServerCheck {
[CmdletBinding()]

Param(
[Parameter(Position = 0, Mandatory = $True)]$Checks,
[Parameter(Position = 1, ValueFromPipeline = $True)]$ComputerName,
[Parameter(Position = 2)]$Path = $Env:TEMP
)

Process {
If ($ComputerName) {
$Computer = $ComputerName
} Else {
$Computer = $Env:COMPUTERNAME
}

$CheckResults = @()

$Checks.GetEnumerator() | ForEach-Object {
Write-Host "Running Check, $($_.Key), on $Computer" -ForegroundColor 'Green'

$Params = @{
"ScriptBlock" = $_.Value.Check
"Verbose" = $MyInvocation.BoundParameters.Verbose
}

If ($ComputerName) {
$Params.Add('ComputerName', $Computer)
}

$Result = Invoke-Command @Params

$CheckResults += ,[PSCustomObject]@{
"Check" = $_.Key
"Result" = $Result
"Condition" = (Invoke-Command -ScriptBlock $_.Value.Condition -ArgumentList $Result)
}
}

$Output = [PSCustomObject]@{
"Server" = $Computer
"Results" = $CheckResults
}

$FileName = "ServerResults-{0}-{1}.xml" -F $Computer, (Get-Date -Format "yyyy_MM_dd_HH_mm_ss")

Export-Clixml -Path (Join-Path -Path $Path -ChildPath $FileName) -InputObject $Output
}
}

Next, we will want to generate a report telling which checks have passed or failed for any of the given servers.

How the New-ServerReport function operates

To make better sense of which checks have run against which servers, we will use the New-ServerReport function.

The function performs the following steps:

  1. looks for XML files that match the name ServerResults;
  2. runs checks based on whether a Daily or Monthly report exists;
  3. looks at the CreationTime to determine whether to either pull all files on the given day or 30 days back;
  4. after gathering the results, groups them based on the servers and then outputs a table of the checks; and
  5. saves the results to a CSV file for later viewing.
Function New-ServerReport {
[CmdletBinding()]

Param(
[Parameter(Position = 0)]
[ValidateSet('Daily','Monthly')]
[String]$Type = 'Daily',
[Parameter(Position = 1)]$Path = $Env:TEMP,
[Parameter(Position = 2)]$ReportPath = $Env:TEMP
)

Process {
$Files = Get-ChildItem -Path $Path -Filter '*.xml' | Where-Object Name -Match 'ServerResults'

Switch ($Type) {
'Daily' {
$Results = $Files | Where-Object 'CreationTime' -GT (Get-Date -Hour 0 -Minute 00 -Second 00)

$ResultArray = @()

$Results | ForEach-Object {
$ResultArray += ,[PSCustomObject]@{
'Results' = (Import-Clixml -Path $_.FullName)
'DateTime' = $_.CreationTime
}
}

$Report = $ResultArray | Foreach-Object {
$DateTime = $_.DateTime

$_.Results | Group-Object -Property 'Server' | Foreach-Object {
$Server = $_.Name

$_.Group.Results | ForEach-Object {
$Object = [PSCustomObject]@{
"Server" = $Server
"Check" = $_.Check
"Result" = $_.Condition
"DateTime" = $DateTime
}

$Object
}
}
}

$FileName = "ServersReport-{0}.csv" -F (Get-Date -Format "yyyy_MM_dd_HH_mm_ss")

$Report | Export-CSV -Path (Join-Path -Path $ReportPath -ChildPath $FileName) -NoTypeInformation

$Report

Break
}

'Monthly' {
$Results = $Files | Where-Object 'CreationTime' -GT (Get-Date).AddDays(-30)

$ResultArray = @()

$Results | ForEach-Object {
$ResultArray += ,[PSCustomObject]@{
'Results' = (Import-Clixml -Path $_.FullName)
'DateTime' = $_.CreationTime
}
}

$Report = $ResultArray | Foreach-Object {
$DateTime = $_.DateTime

$_.Results | Group-Object -Property 'Server' | Foreach-Object {
$Server = $_.Name

$_.Group.Results | ForEach-Object {
$Object = [PSCustomObject]@{
"Server" = $Server
"Check" = $_.Check
"Result" = $_.Condition
"DateTime" = $DateTime
}

$Object
}
}
}

$FileName = "ServersReport-{0}.csv" -F (Get-Date -Format "yyyy_MM_dd_HH_mm_ss")

$Report | Export-CSV -Path (Join-Path -Path $ReportPath -ChildPath $FileName) -NoTypeInformation

$Report

Break
}
}
}
}

Running the monitoring with PowerShell script

There are several ways to use this script, but the simplest is to add the servers to check and then use the New-ServerReport command to determine which checks have run over time.


@("Server1","Server2","Server3") | Invoke-ServerCheck
New-ServerReport

Modular structure provides flexibility when monitoring with PowerShell

By using PowerShell to create a modular framework to easily create and execute checks on servers, a system administrator can quickly gain better visibility and control of their environment. Although these checks are simple, there are many ways to extend the capabilities to include more in-depth inquiries into your server inventory.

With new cross-platform abilities of PowerShell 7, you can extend these checks to work on Linux systems to handle things such as necessary OS-specific updates.

Go to Original Article
Author:

For Sale – 8GB (2x4GB) DDR3 RAM Kingston

I need a DVI and hdmi or Display Port as I’m driving 2 monitors with no VGA inputs

I don’t think you can drive 2 monitors from 1 DVI though I think it’s possible to daisy chain with Display Port?

lightroom and Olympus workspace both want 2GB for acceleration though something that supports a more modern version of OpenGL would be an improvement if it can drive both displays.

Go to Original Article
Author:

For Sale – Dell S2716DG – 144Hz (G-Sync Ultimate) Monitor / Corsair H110, Corsair AM4 Bracket, Silverstone Headphone Stand

Due to a recent upgrade, and the need to clear some space in the garage, I’ve got the following up for sale.

ADDED: Dell S2716DG – 144Hz (G-Sync Ultimate) Monitor – £285

Monitor


Dell S2716DG – 144Hz (G-Sync Ultimate) Monitor – £285

Monitor has no dead pixels, minimal backlight bleed, is fully g-sync compatible.
It has one small nic on the bottom bezel of the screen, a photograph has been taken to show this.
Currently it is attached a to an arm, but the stand is in perfect condition and the monitor still has it’s original packaging.

I would prefer this one to be collection, but can be sent by post as I still have original packaging. Insurance will be an issue, since most commercial couriers do not insure against damage to screens. If it is sent by post, I will not be liable for any damage caused by couriers.

Miscellaneous
MSI SLi Bridge (Link) £10.00 £7.00
Silverstone Headphone Stand Black £45.00 £40.00

DDR2
Corsair XMS2 DDR2 1GB (2 x 512mb) (Untested) £10.00 £7.00

Cases:
Phanteks Evolv ITX Used £35.00 (Collection Only) £30.00

Coolers:
Corsair H110 Used £70.00 £60.00 £55.00

AM4 Bracket
2 x Genuine Corsair AM4 mounting brackets £12.50 £10.00

Most items will be boxed in their original retail or OEM packaging.

I will updating this thread as I discover anything else that I no longer require.

Open to offers.

Photos on old thread:

MSI Z170I ITX Used £75.00
Asus Z97 Pro Gamer £90.00 £75.00
£60.00 SOLD
Corsair 16GB Vengeance LPX (2 x 8GB) 2400MHz Black £65.00 Sold to dave_s
Corsair 16GB Low Profile DDR3 2400Mhz (2x8GB) – £40 Sold to kinnsy
LGA 1151 – Intel Core i5-6600 Used £80.00 Sold to dave_s
LGA 1150 – Intel Core i5 4690K – £90.00 £80.00 £60.00
Razer Mamba Elite 2016 Wireless Used £60.00 £35.00
EVGA SuperNOVA G2 650W Used £50 Sold elsewhere
Corsair H80i Used £45.00
Corsair AF120 Quiet Edition Red LED x 2 £10.00
Corsair SP140 Dual Pack Red LED £12.00
NZXT Grid+ v2 Fan Controller £15.00
Corsair H50 Used £35.00

Go to Original Article
Author:

For Trade – 8GB (2x4GB) DDR3 RAM Kingston – looking for low end GFX Card

I need a DVI and hdmi or Display Port as I’m driving 2 monitors with no VGA inputs

I don’t think you can drive 2 monitors from 1 DVI though I think it’s possible to daisy chain with Display Port?

lightroom and Olympus workspace both want 2GB for acceleration though something that supports a more modern version of OpenGL would be an improvement if it can drive both displays.

Go to Original Article
Author:

Yugabyte boosts distributed SQL database with new funding

Among the emerging types of databases enterprises need in the cloud era are distributed SQL databases that enable multiple disparate nodes to act as a single logical database.

With a distributed SQL database, users can enable more scalable database deployments than with a traditional SQL database that typically was designed in the era when on-premises databases were the norm.

One distributed SQL database startup, Yugabyte, has taken an open source approach to building out its platform as a way to grow its technology. On May 19, the company hired a new CEO, former Pivotal Software and Greenplum Software President Bill Cook, to take over from co-founder Kannan Muthukkaruppan, who is now president.

Cook was the CEO of Greenplum from 2006 to 2010, when the company was acquired by EMC. The Greenplum division was spun out as part of Pivotal Inc. in 2013 and Pivotal was subsequently acquired by VMware in 2019.

Yugabyte, founded in 2016 and based in Sunnyvale, Calif., said Tuesday that it raised $30 million in a Series B round of funding led by 8VC Lightspeed Venture Partners, bringing total funding to date to $55 million. The new investment will help the vendor expand its go-to-market efforts including a cloud database as a service (DBaaS), according to Yugabyte.

In this Q&A, Cook talks about the growing distributed SQL database market.

Why did Yugabyte raise a funding round in the midst of the COVID-19 pandemic?

Bill CookBill Cook

Bill Cook: We were doing this fund raising in parallel with the company recruiting me to join. But, you know, the impetus is obviously that there is a big market opportunity in front of us.

As to why $30 million, it was really around what was going to be required to continue the investment on the engineering product side to grow the organization aggressively. And we’re also ramping on the enterprise go-to-market side.

If you think about things like the pandemic and the changes that are going on more globally, it really just starts to accelerate how people think about technology. When you’re an open source database company like we are, with the services that we deliver, I think it is an accelerant.

If you think about things like the pandemic and the changes that are going on more globally, it really just starts to accelerate how people think about technology.
Bill CookCEO, Yugabyte

How does your past experience in the compare with the new challenge of leading Yugabyte?

Cook: At Greenplum, we were taking on a new market category as a pre-Hadoop, big data type vendor. Like Yugabyte now, PostgreSQL compatibility and the alignment with the open source PostgreSQL community was important to us then as well. At Pivotal, we were helping organizations with the modernization of application portfolios and moving to a new platform like Cloud Foundry [an open source, multi-cloud application platform as a service] helped to show the way.

When I got to know Yugabyte’s co-founders, Kannan Muthukkaruppan and Karthik Ranganathan, I felt it was a similar story to Greenplum, in the sense that it’s an emerging company in a big space.

The most important question I had and that they had for me was really around cultural fit and what are we really trying to do here. We want to build a very special company, where we attract the best and brightest and we’re going after a very big market and doing it in an open source way that can appeal to the largest enterprises around the globe.

Where do you see Yugabyte distributed SQL fitting into the database landscape?

Cook: At the back end of this technology it’s about being distributed. Databases should be able to run across time zones or regions or geographies and do it in a scalable, performant way. Resiliency is obviously the core tenet that you’re looking for in a database.

The decision to be aligned with the PostgreSQL community on the front end of the technology helps to serve the SQL market and leverage that community. I think the combination of open source PostgreSQL compatibility with the technology and the expertise that Yugabyte has is what differentiates us.

When we talk to enterprises, you know, they’re looking to simplify their lives. They want to have an end-to-end story that gives them that capability to move off of a traditional database infrastructure and do it with a with a trusted partner.

What do you see as the opportunity for DBaaS with distributed SQL?

Cook: Organizations are thinking about how to be able to leverage cloud infrastructure. You know it’s a similar to the experience we had at Pivotal with Cloud Foundry. Users wanted to make sure they could run workloads in Cloud Foundry across private infrastructure or in their public cloud instances.

I think customers will increasingly view cloud services from an infrastructure perspective, as a way to drive cost down, while having application and database capabilities. It’s that simple.

Organizations want a range of offerings, to be able to deploy how they want to deploy.

What’s your view on open source as a model for developing and building a database company?

Cook: I view open source as a requirement today.

From our perspective, the business model of having open source core to everything we do, and then monetizing it as a platform, just gives the community and large enterprises comfort.

In an internal call we had this week, Kannan Muthukkaruppan was talking about all the contributions we’re seeing from the community that help to make the product better. So, I think it’s a win-win-win if you if you do it right.

Editor’s note: This interview has been edited for clarity and conciseness.

Go to Original Article
Author:

For Sale – Mac Mini (2011) i5, 16G RAM, 120gb ssd + 500gb hd

Selling our mac mini as we no longer need it

It’s in decent nic given it’s age, has a few little marks on it as you’d expect

Has currently got Catalina on, which runs fine with 16gb ram and the ssd set as the bootdisk despite it not being ‘officially supported’. I can happly restore to whatever version the machine shipped with fi the buyer prefers.

This is one of the last easily upgradable mac mini’s, and with the TB port supporting mini display you can get a lovely 2560×1600 resolution.

Delivery is not included, I do not have the box readily available, and will be securely packaged up prior to delivery and only sent using royal mail insured

Go to Original Article
Author:

For Sale – Barebones HTPC (Silverstone, Atom 330)

I have an incomplete HTPC that has not been used for a few years. It will need a PSU and HDD/SSD. Untested because I don’t have a spare PSU, but was working fine when last used and made an excellent HTPC for playing HD movies off Plex.

Silverstone GD04 case, cost was nearly £100 new. In good cosmetic condition with only a few tiny marks on the brushed aluminium front panel.

Asus AT3IONT-I motherboard. Intel Atom 330 CPU and Nvidia ION GPU. The GPU does accelerated h.264 encoding so can play 1080p content with ultra-low CPU/GPU usage. These were £99 new and still fetch around £50 used.

– 2GB of Kingston RAM is fitted to the board

– optical drive, which I am sure is DVD (not Bluray).

There are no boxes or manuals available, so collection in person please from just outside of Chorley, Lancashire.

Go to Original Article
Author:

Conversations in culture podcasts | Microsoft In Culture

“When you hear that someone has autism, you can’t go in with specific stereotypes, you need to just start engaging with them one-on-one, learning about them, learning what their challenges are, what they enjoy doing, how they prefer to interact with someone. It’s a very individualized disorder.”

Meet Kendall and Delaney Foster. They’re the sisters behind Unified Robotics, an inclusive after-school program for students with cognitive disabilities. Delaney started the program in 2015 to create a shared activity between her and her sister Kendall, who has autism spectrum disorder. In this episode, find out how the Foster sisters are raising disability awareness. They prove that when programs and technology include people with disabilities, everyone wins.

Read the full episode transcript

Go to Original Article
Author: Steve Clarke

For Sale – Intel Skull Canyon bundle

Hi and thanks for reading.

In dire need of cash atm so my one and only pc setup has to go now

I’ve only ever used it for work and gaming on my tv.

Specs are as follows:

6th generation Intel Core i7-6770HQ processor.
• Intel Iris Pro Graphics.
• Two DDR4 SO-DIMM sockets (up to 32 GB, 2133+ MHz).
• Two M.2 slots with flexible support for a 42 or 80 mm SATA or PCIe SSD.
• Intel Dual Band Wireless-AC 8260 and Bluetooth 4.2.
• SD card slot.
• Two USB 3.0 ports (including one charging port).
• Intel HD Audio via Headphone/Microphone jack.
• Consumer infrared sensor.
• Support for user-replaceable third-party lids.
• Kensington lock support.
• Back panel DC power connector (19V).
• Combo speaker/TOSLINK audio output.
• Intel Gigabit LAN.
• Two USB 3.0 ports on the back panel.
• One Mini DisplayPort version 1.2 supporting 8 channel digital audio (7.1 surround sound).
• One Thunderbolt 3 port.
• One full-size HDMI 2.0 display port supporting 8 channel audio (7.1 surround sound).

My pc will come boxed with the following installed:
1x 256gb samsung m.2 ssd installed (will be formatted before sending out, you will need to install your own OS)
1 x 16gb samsung 2400mhz ram installed

Also comes bundled with the following:

1 x samsung 256gb evo plus m.2 nvme still sealed, mint fresh in the box
1 x Official Microsoft Xbox One Controller, light grey with green accents. Good condition with box
1 x Logitech wireless K830 keyboard with trackpad, perfect for sitting on the sofa, this has recently acquired a scratch on the Space Bar but you cant feel it and doesnt effect usage at all. It has backlight for using in the dark, bluetooth and wireless (with dongle, included) options. Can’t find the box for this but will be suitably packed.

I need £500 including postage for all this no offers please.
MVIMG_20200518_123023.jpgMVIMG_20200518_123031.jpgMVIMG_20200518_123047.jpgMVIMG_20200518_123659.jpgMVIMG_20200518_124047.jpgMVIMG_20200518_124107.jpgMVIMG_20200518_124321.jpgMVIMG_20200518_124336.jpgMVIMG_20200518_130419.jpg

Go to Original Article
Author:

For Sale – Barebones HTPC (Silverstone, Atom 330)

I have an incomplete HTPC that has not been used for a few years. It will need a PSU and HDD/SSD. Untested because I don’t have a spare PSU, but was working fine when last used and made an excellent HTPC for playing HD movies off Plex.

Silverstone GD04 case, cost was nearly £100 new. In good cosmetic condition with only a few tiny marks on the brushed aluminium front panel.

Asus AT3IONT-I motherboard. Intel Atom 330 CPU and Nvidia ION GPU. The GPU does accelerated h.264 encoding so can play 1080p content with ultra-low CPU/GPU usage. These were £99 new and still fetch around £50 used.

– 2GB of Kingston RAM is fitted to the board

– optical drive, which I am sure is DVD (not Bluray).

There are no boxes or manuals available, so collection in person please from just outside of Chorley, Lancashire.

Go to Original Article
Author: