Compare-Object - return only difference object entries of CHANGED rows in files

Hi all,

I'm using Compare-Object to basically compare two CSV files, and return additions, changes, and removals.

Essentially I'm runnning:
(Note that "@files" is only in quotes to stop Reddit converting it to a user link!)

$files = @{
ReferenceObject = (Get-Content -Path C:\file1.csv)
DifferenceObject = (Get-Content -Path C:\file2.csv)}
Compare-Object "@files" | export-csv C:\differences -NoTypeInformation

Lets say the files look like this:

File 1
Cat,Brown,4
Dog,Black,4
Horse,White,4

File 2
Cat,GINGER,4
Dog,Black,4
Duck,Grey,2

Duck has been added in file2 (not present in file1)
Horse has been removed in file2 (was present in file1)
Cat is changed from file1 to file2.

The compare-object gives me a list of changes in a new file.

  • Entries found in file2 but not in file1 (Duck) are marked with side indicator =>
  • Entries found in file1 but not in file2 (Horse) are marked with side indicator <=
  • However, entries that are still present in both files but have had one or more of their columns changed (Cat) are present in the results file with both side indicators.

I understand this correct given how Compare-Object works, but it leads to a problem when I try to create separate "Additions/Changes" and "Removals" files based on the results.

For example, to see only the items Added or Changed in file2 (Duck and Cat), I can use:

?{$_.SideIndicator -eq '=&gt;'}

To show only the difference object results.

The problem comes when I use the opposite side indicator:

?{$_.SideIndicator -eq '&lt;='}

As this gives me the removed item I need, (Horse), but also gives me the changed item (Cat) from File1. This gives me no way of telling which of the "<=" entries are removals and which are changes. I'm looking for a way to differentiate between the two.

I hope this makes sense...!

reddit.com
u/greenstarthree — 8 days ago

Cloud Secure Edge - custom IP range for connected clients?

Hi all, want to make sure I’m not missing something while testing CSE.

We have public IP ranges enabled, so when a client is connected to CSE through our firewall connector, the IP address that’s “seen” when making a connection to an internal resource is in the 100.121.0.0/16 range.

Is there any way to customise that range to something else?

I understand it’s using the CGNAT space, but it’s quite a broad range and when configuring internal access using e.g. Windows Firewall, we’d rather allow a custom small range than a full /16.

Hope this makes sense!

reddit.com
u/greenstarthree — 22 days ago

Cloudflare One / ZTNA - pass virtual IP of remote client to services behind tunnel?

Hi all,

Doing a new setup of Cloudflare Zero Trust using the One client and a Cloudflared connector instance on a Windows server inside the LAN we’re connecting into.

I have the basic tunnel working, and have created a virtual IP range in Cloudflare, from which connected clients are assigned a virtual IP address (as opposed to the default of being assigned a CGNAT IP).

Services behind the tunnel (ie on the LAN) “see” the incoming connections as coming from the server on which the Cloudflared connector is running. I see CFs documentation stating that this is the normal behaviour.

I would ideally like the connections to appear to come from the virtual IP address assigned to the remote client. Not sure if this is actually possible, but it would allow us to make firewall exceptions for only the remote virtual IP range and not the server machine where Cloudflared is running.

Is there a config / setting I’m missing for this, could anyone advise?

Thanks!

reddit.com
u/greenstarthree — 23 days ago

Windows 11 clock / system tray missing after JULY cumulative update?

Hi all,

A number of our PCs are missing the clock and system tray (bottom right corner) after installing the July cumulative update just released this week.

The strange thing is all reports of this I can find say it began after the June update, which our machines have had in place for a few weeks already without issue.

Is anyone else seeing this come up just now?

EDIT - SOLUTION DISCOVERED!

We’ve just discovered the cause of this in our environment:

We have a group policy to disable the Windows Audio service on the majority of desktop PCs, since audio is seldom used on anything but laptops.

As soon as we disabled that group policy (therefore enabling the audio service) and then restarted, the clock and system tray is restored.

Bizarre, but there it is!

reddit.com
u/greenstarthree — 3 months ago

SQL Server 2022 - Device CALs when using RDS?

Hi all,

Thigh-deep in SQL licensing docs and can’t find a definitive answer on something that I’m sure is a loophole Microsoft wouldn’t leave open…

Looking at an ERP app that uses SQL as its database.

The app’s server would run on a Windows Server 2022 VM on Hyper-V.
The client app would be installed on a single Server 2022 Remote Desktop Session Host.
Users would access the application via the session host using RemoteApp.

For SQL Standard 2022 we have the option of per core or server + CAL licensing.

For the server + CAL option we can then order user or device CALs.

Device CALs are described as being valid for a single device used by any number of users.

Question - does this apply to a Remote Desktop Session Host server?

That is, assuming we’ve purchased the required number of RDS CALs, is just one SQL Device CAL valid for the RDS server, given that it is the only device accessing the SQL database?

Thanks!

reddit.com
u/greenstarthree — 3 months ago

SQL Server 2022 - Device CALs when using RDS?

Hi all,

Thigh-deep in SQL licensing docs and can’t find a definitive answer on something that I’m sure is a loophole Microsoft wouldn’t leave open…

Looking at an ERP app that uses SQL as its database.

The app’s server would run on a Windows Server 2022 VM on Hyper-V.
The client app would be installed on a single Server 2022 Remote Desktop Session Host.
Users would access the application via the session host using RemoteApp.

For SQL Standard 2022 we have the option of per core or server + CAL licensing.

For the server + CAL option we can then order user or device CALs.

Device CALs are described as being valid for a single device used by any number of users.

Question - does this apply to a Remote Desktop Session Host server?

That is, assuming we’ve purchased the required number of RDS CALs, is just one SQL Device CAL valid for the RDS server, given that it is the only device accessing the SQL database?

Thanks!

reddit.com
u/greenstarthree — 3 months ago

NetExtender 10.3.5 released - introduces DTLS - is it enabled by default?

The release notes mention that NX 10.3.5 adds DTLS support for improved latency especially in time sensitive applications.

I don’t see any additional settings in the NetExtender client GUI, and don’t remember anything in the last firewall firmware release about DTLS.

Should we assume DTLS is on by default in 10.3.5?

Does it require a specific firmware version on the firewall?

Does it need to be enabled at install of NX 10.3.5 by command line switches perhaps?

Hoping perhaps the SonicWall rep who often posts here can clarify as struggling to find more info than what is in the release notes at the moment.

EDIT - Also while we’re here:

NetExtender 10.3.5 force disconnects sessions after the “Inactivity Timeout” setting configured in the firewall, regardless of whether the session is inactive or active.

Watched this happen in real time - our Inactivity Timeout setting is set to 90 minutes. Had a user connected actively working, as soon as their session time hit 90, they were disconnected.

Can only assume NX 10.3.5 is not communicating activity properly to the firewall and so the firewall thinks sessions are constantly inactive.

Another NX release, another bug!

Thanks!

reddit.com
u/greenstarthree — 5 months ago
▲ 14 r/Intune+1 crossposts

Does enabling Hotpatch updates mean you only get quality updates quarterly?

Hi all,

Just one point about Hotpatch I'm struggling to wrap my head around...

Based on the release schedule shown in Microsoft's docs:

Hotpatch updates | Microsoft Learn

It essentially says we get a Baseline Update in Jan / April / July / Oct, with a Hotpatch Update in the months between those.

From this are we right in understanding that during Hotpatch months, we only receive security updates, not any enhancements / new features? I believe that's what negates the need for a restart.

This is good, but isn't the effect of this that if we are using Hotpatch today, we got our last Baseline update in April, and so we will only get security updates in May and June, having to wait for July's Baseline update for any enhancements / features?

I guess what I'm asking is, if we opted out of Hotpatch, would we effectively receive a baseline update every month, and thus get enhancements / features faster, with the caveat of having to reboot every month?

Or, is this just Microsoft's new update schedule, and they're only releasing enhancements / features quarterly regardless of whether we're opted into Hotpatch or not?

u/greenstarthree — 5 months ago

Access to website (UK) from China

Hi All,
In all my years, this is something I’ve never hit up against so looking for some general guidance.

Recently migrated a website to new hosting provider.
Since doing so, access to the website from China is not working.

Hosting provider confirmed no geo blocking in place.

Can ping and tracert to the website IP address from China IPs, but unable to access the site over HTTPS.

Colleagues in China suggest it must be the China government firewall, which it certainly seems to be. Guess we were lucky that the previous hosting IP wasn’t blocked.

What approaches are available to address this? They’ve suggested reverse proxy in Hong Kong, but not sure of the technical (or legal) implications of something like that.

Thanks!

reddit.com
u/greenstarthree — 5 months ago