Making Playwright Work on Alpine Out of Spite

Doing Who On What Now? Playwright is a Web Testing and Automation framework developed by Microsoft, it’s similar to Selenium or Puppeteer. The core project is written in nodejs and there are sub-projects offering the same framework in Python, .NET, and Java. It’s the Python project that I was specifically interested in due to its use in the changedetection.io container that I maintain for Linuxserver.io. The problem is that the container uses an Alpine base image whereas Microsoft only publish wheels for glibc, and they don’t publish the source to Pypi for pip to build, which means you can’t just do pip install playwright because it won’t be able to find a muslc wheel to install from....

2024-03-13 · 5 min · Adam

Protected Users Group Policy Bugs

So apparently members of the Protected Users group can’t edit Wired 802.1x group policy. Wireless 802.1x? Sure. Every other group policy setting? Yup. Wired 802.1x? Can’t load the snapin. Got to love the consistency there, Microsoft.

2019-11-30 · 1 min · Adam

Windows 10 User Environment Variables

Windows 10 has made a lot of changes from previous versions, one of which is that you can no longer view System Properties as a non-admin user. This means you can no longer view/edit your user environment variables via System Properties. There are 3 ways around this: Use another method such as set or Powershell or direct registry editing Go to Control Panel->User Accounts->Change My Environment Variables Run "C:\WINDOWS\System32\rundll32.exe" sysdm.cpl,EditEnvironmentVariables to envoke the Environment Variables window directly

2017-09-06 · 1 min · Adam

Actually Configuring The Exchange Availability Service In A Cross-Forest Environment

If you’ve ever looked at configuring the Exchange Availability Service to allow cross-forest free/busy lookups you’ve probably realised that the documentation surrounding it is awful. Get-MailboxServer | Add-ADPermission -Accessrights Extendedright -Extendedrights "ms-Exch-EPI-Token-Serialization" -User "<Remote Forest Domain>\Exchange servers" From here, doesn’t even work for a start, because Get-MailboxServer doesn’t return the correct identity objects for Add-ADPermission. Once you’ve worked out how to get that sorted and done your Add-AvailabilityAddressSpace -Forestname ContosoForest.com -AccessMethod PerUserFB -UseServiceAccount:$true You’re probably thinking that you’re done, but it usually isn’t that simple....

2017-06-09 · 3 min · Adam

Proxy Authentication With Powershell

We all know how annoying it is working somewhere with a proxy server that requires authentication, especially as Microsoft increasingly don’t support the scenario with many of their Azure-related tools. However, it is quite possible to use authenticated proxies with .NET applications including Powershell. For the former, edit the application .config file and add <system.net> <defaultProxy useDefaultCredentials="true" /> </system.net> And for Powershell, add the following to your scripts or $profile...

2016-09-09 · 1 min · Adam

Send Skype For Business (Lync) IMs via Powershell

This script uses UCWA to send IMs via Skype For Business. Unlike the commonly documented methods using Microsoft.Lync.Model from the Lync SDK which require the Lync/S4B client to be installed, running and logged in to work, this will run from any machine on your internal network (and in theory could be used externally with some tweaking too). It still needs some cleaning up because none of the code examples I could find were for Powershell so there was a bit of trial and error and I’m sure things can be done more efficiently, but at a basic level it does what it’s supposed to....

2016-02-02 · 4 min · Adam

Update Window Settings After Scripted Changes

Let’s say you make a change to your locale settings by directly editing the registry, modifying the HKCU\Control Panel\International\sTimeFormat key. Problem is that Windows doesn’t pick up these changes until you log off and back on again or restart explorer.exe. Now if you make the changes via Control Panel you don’t have to do this, so why do you if you modify the registry? Well, when you use the UI to make changes to the locale or any other policy or environment settings, Windows sends a WM_SETTINGCHANGE broadcast to all Windows notifying them of the change to settings so they can refresh their config and you can do it too!...

2015-12-03 · 2 min · Adam

Get GC Status From All DCs

Quick and easy one-liner - if you need to know at a glance which DCs in a domain are GCs and which aren’t: [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers | %{"$($_.Name) : $($_.isglobalcatalog())"}

2014-07-10 · 1 min · Adam

DHCP-Multitool

The following script is an amalgamation of several tools I’ve built up over the last couple of years to work with multiple DHCP scopes on servers. It has 6 basic modes of operation, as detailed below, which allow you to list all scopes on a server, enable all scopes on a server, disable all scopes on a server, change the lease time for all scopes on a server, change the offer delay for all scopes on a server or add reservations to one or more servers....

2012-10-16 · 5 min · Adam

Getting Last Logon Times For Members of A Group – ADSI Edition

This handy little script will pull all of the users from the specified AD group and then grab the LastLogon time from each specified DC (or you could use[DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain().DomainControllers to get all of them in the current domain) as well as grabbing the LastLogonTimeStamp for good measure. You can also specify which attribute you want to sort the results on; I recommend samaccountname because it’s usually the most useful. Obviously it’s much quicker and simpler to do this with the ActiveDirectory cmdlets, but sometimes you’re stuck working with a bunch of 2003 DCs and have to make do with ADSI....

2012-08-20 · 3 min · Adam