Fix unit test and Name being null in some cmdlets.