This question doesn't pop up every week - probing an inverter output is *NOT* the same as probing your utility company mains supply.
Direct connection is inadvisable unless you have name brand appropriately rated probes for a number of less obvious reasons, many of which don't apply to probing a utility company mains supply. e.g:
* With inverters its unwise to assume that the output has a near ground Neutral - its quite possible it has two anti-phase Line terminals , as driving them in a full bridge configuration halves the HT DC bus voltage required for a particular RMS AC voltage. Therefore it would be extremely unwise to clip a scope probe ground to what you *THINK* is output neutral unless you have verified direct continuity to chassis, ground terminal or the negative side (0V) of the DC input.
* Scope probes need to be derated with frequency e.g. a x10 probe that's rated for +/- 400V at DC, may only be good for 200V at 100KHz. With a switching waveform, its the edge slew rate that's important, so even if the inverter only uses a 10KHz PWM, if they've skimped on output filtering. there could be significant energy in the edges at an order of magnitude higher frequency, so you could well be pushing the limits of what a generic x10 probe can safely handle. I certainly wouldn't care to risk it with a no-name switchable x1/x10 probe.
OTOH a transformer will cause some waveform distortion. However if you don't want to splash the cash for a Cat II or better rated differential probe you may not have any other good safe alternative.