This could probably be pushed up to HostedServiceExtensionBaseCmdlet class. It looks like it'll be used frequently by all new extension cmdlets.