Updated code - All cmdlets now functioning