At a site, something in the network filtering changed, so printing from a Mac failed.
In the end this was about port 631, which is for the IPP protocol a Mac uses.
—jeroen
Posted by jpluimers on 2019/07/12
At a site, something in the network filtering changed, so printing from a Mac failed.
In the end this was about port 631, which is for the IPP protocol a Mac uses.
—jeroen
Posted in Apple, Mac, Power User | Leave a Comment »
Posted by jpluimers on 2019/07/12
The archive is of late 2017; I wonder what the state is now: [Wayback] Government & Govt Owned – Netherlands – Phishing Scorecard
This Phishing Scorecard is the current situation of the security of e-mail stream banks compared. If a bank is one of the technical building blocks to implement in their e-mail security the red cross will be a green check mark. Once a bank’s security policy has only green check marks will stand up and protect them 40% of their customers.
–jeroen
Via: [WayBack] ‘Mailservers Tweede Kamer missen beveiliging tegen e-mailspoofing’ – update – IT Pro – Nieuws – Tweakers
De mailservers van de Tweede Kamer missen beveiligingsmaatregelen die e-mailspoofing tegen moeten gaan, waardoor het mogelijk is om uit naam van politici e-mails te versturen. Dat blijkt uit een onderzoek van Follow the Money.
Posted in Power User, Security | Leave a Comment »
Posted by jpluimers on 2019/07/11
A while back, I needed to check Windows Update information on a few hosts, so I wanted to script it. Below are a few links that helped me solve this started.
Note: For Windows Update, you need the TiWorker.exe process, which can consume a lot of CPU. See DISM fix for Windows 8.1 high CPU usage of TiWorker.exe which is basically the same for all Windows versions since 8.0.
gcim)gwmi) which is similar to WMIC on the command-line.
gcim works for SCCMas well, except for hotfixes. I’m not sure it works for WSUS as well as I’ve not used that in a long while; this should work: [WayBack] powershell check windows update on a server – Server Fault).The infrastructure management on that site was ehm, a bit lacking, so PowerShell modules were out, heck even PowerShell itself was initially problematic (it needed running of unsigned sources.
Microsoft.Update.AutoUpdateThis gets the last date that anything was done (query, actual update, download) on Windows Updates, but does not guarantee the installation date; on some systems it does not even return a result:
$windowsUpdateObject = New-Object -ComObject Microsoft.Update.AutoUpdate
$windowsUpdateObject.Results
This one works better though:
$windowsUpdateObject = New-Object -ComObject Microsoft.Update.AutoUpdate
$windowsUpdateObject.Results.LastInstallationSuccessDate
Based on that, you can get the number of days like this:
(New-TimeSpan -Start $windowsUpdateObject.Results.LastInstallationSuccessDate.Date -End (Get-Date)).Days
Get-HotFixThough some people report that InstalledOn can be empty, I’ve hardly that happen with Get-HotFix. The easiest way to get around that is filtering with | Where-Object InstalledOn -ne $null
The cool thing with Get-HotFix is that you can filter on the kind of security update, so this gets the moment the last security update got installed:
(Get-HotFix -Description "Security Update" | Where-Object InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn
And this the number of days since the last security update got installed:
(New-TimeSpan -Start (Get-HotFix -Description "Security Update" | Where-Object InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn -End (Get-Date)).Days
Step by step:
Get-HotFix -Description "Security Update"Gets all the security updates.
| Where-Object InstalledOn -ne $nullFilter out entries having an empty
InstalledOn.
Sort-Object InstalledOn -DescendingGet the most recent on the top.
| Select-Object -First 1Select only the top entry.
(Get-HotFix -Description "Security Update"...).InstalledOnGet only the
InstalledOnproperty.
Get-DateGet the current timestamp consisting of date and time.
New-TimeSpan -Start (...).InstalledOn -End (Get-Date)Get a
TimeSpanover a start and end timestamp.
(New-TimeSpan ...).DaysGet the
Daysproperty of aTimeSpan.
You can do the same for regular updates by changing the -Description parameter:
(Get-HotFix -Description "Update" | Where-Object InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn
(New-TimeSpan -Start (Get-HotFix -Description "Update" | Where-Object InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn -End (Get-Date)).Days
The Description values I found are these:
PS C:\Users\Developer> Get-HotFix | Sort-Object -Unique Description | Select-Object Description
Description
-----------
Hotfix
Security Update
Update
Ironically, since the command is called Get-HotFix, the Hotfix entries on my various Windows systems have been a long long time ago:
(New-TimeSpan -Start (Get-HotFix -Description "Hotfix" | Where-Object InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn -End (Get-Date)).Days
When writing this in 2017, on Windows 8.1, this was more than 600 days, Windows 7 more than 400 days and Windows 10 did not have any Hotfix entries.
On PowerShell 2 and older, you get an error containing “Where-Object : Cannot bind parameter ‘FilterScript'”:
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "InstalledOn" value of type "System.String" to type "System.Management.Automation.ScriptBlock".
At line:1 char:48
+ (New-TimeSpan -Start (Get-HotFix | Where-Object <<<< InstalledOn -ne $null | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn -End (Get-Date)).Days
+ CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.WhereObjectCommand
You solve it like this:
(New-TimeSpan -Start (Get-HotFix | Where-Object { $_.InstalledOn -ne $null } | Sort-Object InstalledOn -Descending | Select-Object -First 1).InstalledOn -End (Get-Date)).Days
By now code has become almost unreadable, so you can split it using backtick ` characters:
( `
New-TimeSpan -Start `
( `
Get-HotFix | Where-Object { $_.InstalledOn -ne $null } `
| Sort-Object InstalledOn -Descending `
| Select-Object -First 1 `
).InstalledOn `
-End (Get-Date)`
).Days
On non-English Windows systems, the InstalledOn might actually be in the future, as you can view this happening by this simple command which I ran on 2017-11-02 :
Get-HotFix | Out-GridView
You solve it by adding a filter:
Get-HotFix | Where-Object InstalledOn -lt (Get-Date) | Out-GridView
If you run them from a script (like a batch file Get-HotFix ^| Out-GridView or ps1 file Get-HotFix | Out-GridView), then the grid-view will pop-up and immediately close because the PowerShell process ends. In that case, you need to change your scripts to add the -Wait parameter:
PowerShell Get-HotFix ^| Out-GridView -Wait
Powershell.exe -Command "Get-HotFix | Out-GridView -Wait"
Get-HotFix | Out-GridView -Wait
See:
If I ever want to do the same from C#, I need to figure out where to get the WUApiLib from; more on that library is at [WayBack] Use C# to interact with Windows Update – Stack Overflow and [WayBack] Searching, Downloading, and Installing Updates (Windows).
–jeroen
Posted in Development, Power User, PowerShell, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2019/07/10
Searching for esxi list usb devices on host console did not return meaningful results, but after a few more deeper tries I found that ESXi has lsusb at
Here the difference when connecting another USB hub with devices to an existing ESXi machine:
[root@ESXi-X10SRH-CF:~] lsusb Bus 001 Device 005: ID 0781:5583 SanDisk Corp. Ultra Fit Bus 001 Device 004: ID 0557:2419 ATEN International Co., Ltd Bus 001 Device 003: ID 0557:7000 ATEN International Co., Ltd Hub Bus 003 Device 002: ID 8087:8002 Intel Corp. Bus 002 Device 002: ID 8087:800a Intel Corp. Bus 001 Device 002: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon Bus 003 Device 001: ID 0e0f:8002 VMware, Inc. Bus 002 Device 001: ID 0e0f:8002 VMware, Inc. Bus 001 Device 001: ID 0e0f:8003 VMware, Inc. [root@ESXi-X10SRH-CF:~] lsusb Bus 001 Device 010: ID 0409:005a NEC Corp. HighSpeed Hub Bus 001 Device 009: ID 0922:0019 Dymo-CoStar Corp. LabelWriter 400 Bus 001 Device 008: ID 06bc:0324 Oki Data Corp. Bus 001 Device 007: ID 0409:005a NEC Corp. HighSpeed Hub Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. Hub Bus 001 Device 005: ID 0781:5583 SanDisk Corp. Ultra Fit Bus 001 Device 004: ID 0557:2419 ATEN International Co., Ltd Bus 001 Device 003: ID 0557:7000 ATEN International Co., Ltd Hub Bus 003 Device 002: ID 8087:8002 Intel Corp. Bus 002 Device 002: ID 8087:800a Intel Corp. Bus 001 Device 002: ID 0557:2221 ATEN International Co., Ltd Winbond Hermon Bus 003 Device 001: ID 0e0f:8002 VMware, Inc. Bus 002 Device 001: ID 0e0f:8002 VMware, Inc. Bus 001 Device 001: ID 0e0f:8003 VMware, Inc.
A few odd things about the devices listed above:
/var/log/* files when searching for Oki, Dymo or NEC06bc:0324 Oki Data Corp. as a “Composite device” with a few sub-devices “MC5(3)x2/ES5(3)4×2” and “USB Printing Support”0922:0019 Dymo-CoStar Corp. LabelWriter 400 as “USB Printing Support” with a subdevice “DYMO LabelWriter 400”Two indispensable tools on Windows for dealing with USB devices are:
They give a much easier to read view than devmgmt.msc, this despite the “hidden devices” trick at [WayBack] Tweak Device Manager for a more Complete View of Devices
Related:
–jeroen
Posted in Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »
Posted by jpluimers on 2019/07/08
I might want to try and buy one of these: [WayBack] Applesauce – Make exact images of copy-protected Apple II floppy disks | Hacker News.
A truckload of information is at [WayBack] Applesauce – The ReActiveMicro Apple II Wiki
It is still being updated: [WayBack] applesauce – Apple II Floppy Drive Controller
Via [WayBack] This week, in 6502-related hardware, the Applesauce: a Disk II imaging kit for your Apple II disks. Thanks to the minimal nature of Woz’ disk interface,… – mos6502 – Google+
Related: [WayBack] Confessions of a Disk Cracker: The Secrets of 4am | Hacker News
Why did you choose to start aggressively de-protecting, archiving and re-distributing Apple II software? It’s tempting to rewrite history and give myself some noble purpose for starting this hobby, but in this case the truth [more…]
Paleotronic Magazine celebrates retro-technology with features, articles, interviews, projects, reviews, news and more!
Videos below the fold…
–jeroen
Posted in //e, 6502, Apple, History, Power User | Leave a Comment »
Posted by jpluimers on 2019/07/08
Cool: Windows 10 allows ANSI/VT100 terminal escape codes without extra tooling. [WayBack] Colored text output in PowerShell console using ANSI / VT100 codes – Stack Overflow.
It is off by default (can be modified through the registry), can be turned on by either using an API call, or by piping through PowerShell.
For older versions, read [WayBack] Windows console with ANSI colors handling – Super User, of which this is a small quote:
For Windows version below 10, the Windows command console doesn’t support output coloring by default. You could install either Cmder, ConEmu, ANSICON or Mintty (used by default in GitBash and Cygwin) to add coloring support to your Windows command console.
Via [WayBack] Did you know that you can enable VT100 terminal emulation in PowerShell as well as the Cmd window? This will allow you to do adb shell to your Android … – Lars Fosdal – Google+
–jeroen
Posted in Color (software development), CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2019/07/05
You can the final download locations through files like https://platformdl.adobe.com/adm/smanifest/readerdc_en_1801120058.xml, which contains https://ardownload2.adobe.com/pub/adobe/reader/win/AcrobatDC/1801120058/AcroRdrDC1801120058_en_US.exe
Related: [WayBack] Unorthodoxer Weg um an einen Offline Installer für Adobe Flash zu kommen – Administrator
–jeroen
Posted in Adobe, Adobe Reader, Power User | Leave a Comment »
Posted by jpluimers on 2019/07/05
In cast I need a headphone amp:[WayBack] FIIO A1 mini koptelefoonversterker
Via: [WayBack] One of my better gadget purchases: The Fiio A1 portable headphone amp. I was kinda underwhelmed by the quality and especially volume that my Pixel 2016… – Roderick Gadellaa – Google+
–jeroen
Posted in Gadget, Power User | Leave a Comment »
Posted by jpluimers on 2019/07/05
Always use UTC on your servers, as [WayBack] Yeller – The Worst Server Setup Mistake You Can Make: Setting the timezone to anything other than UTC.
Many many reasons. For me the number 1 is sanity.
–jeroen
Posted in Infrastructure, Power User | Leave a Comment »
Posted by jpluimers on 2019/07/01
You can automatically start processes during logon in a lot of ways (Trojans/Viruses find new ways all of the time).
The easiest way is to create a shortcut in one of the Startup folders. There are two of them: one for all the users, and one for the current user. Depending on your locale, Explorer can show a translated name, but the actual folder is named either of these:
"%AllUsersProfile%/Start Menu\Programs\Startup""%AppData%\Microsoft\Windows\Start Menu\Programs\Startup"The folders do not exist at first, but are created when software starts putting shortcuts in them.
For a manual process, I created the two batch files below that create, then go to them (in both the console and explorer).
From there you can add shortcuts to things you want to run during logon.
They are based on:
I have successfully tested them in various Windows versions up until 10.
–jeroen
Batch files:
| :: https://stackoverflow.com/questions/16087694/auto-run-a-bat-script-in-windows-7-at-login | |
| :: https://superuser.com/questions/15596/automatically-run-a-script-when-i-log-on-to-windows | |
| call :do "%AllUsersProfile%/Start Menu\Programs\Startup" | |
| goto :eof | |
| :do | |
| mkdir %* | |
| pushd %* | |
| explorer /e,. |
| :: https://stackoverflow.com/questions/16087694/auto-run-a-bat-script-in-windows-7-at-login | |
| call :do "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup" | |
| goto :eof | |
| :do | |
| mkdir %* | |
| pushd %* | |
| explorer /e,. |
Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows | Leave a Comment »