Hello and welcome to the forum. Please edit your original post and format your code as “Preformatted text” so that syntax and formatting is preserved.
Guide to Posting Code
Your title says that VHDX files are not being created. It looks like this is being done via a program called frx.exe which isn’t a PowerShell problem.
If you have any error messages to provide that would be helpful. From a quick google search it looks like your syntax for calling frx.exe from PowerShell is correct.
Let’s reformat the code and then go from there.