xPSDesiredStateConfiguration
xPSDesiredStateConfiguration copied to clipboard
Service: Assert-NoStartupTypeStateConflict makes no sense
The Assert-NoStartupTypeStateConflict in the Service Resource checks, that you cannot use, e.g. State=Stopped with StartupType=Automatic. It is considered a wrong use case.
But when I don't define Automatic but State=Stopped, I can create a new Service, which is Stopped, but still on automatic. (Which is actually what I want.) So I think all combinations should be ok.
What is probably a better idea to check: If you use Absent=true, it makes no sense to define any State or StartupType.