If you're looking to store the command in a script, I would recommend using a more formal command structure.
Get-NaDisk | ? {$_.RaidState -NE "partner"} | sort DiskType | ft DiskType,Aggregate,RaidState -AutoSize
Becomes...
Get-NaDisk | Where-Object {$_.RaidState -ne "partner"} | Sort-Object -Property DiskType | Format-Table -Property DiskType,Aggregate,RaidState -AutoSize
If you want to re-use any of the intermediate states, you can also use variables. Storing intermediate values in variables can also be helpful in troubleshooting errors in your scripts. Also, if you want to include comments, they are preceded with the # character.
#Get a list of all disks
$allDisks = Get-NaDisk
#Filter out partner disks
$nonpartnerDisks = $allDisks | Where-Object {$_.RaidState -ne "partner"}
#Sort the list of non-partner disks
$sortedNonpartnerDisks = $nonpartnerDisks = $allDisks | Sort-Object -Property DiskType
#Output the data is a formatted table showing the disk type, aggregate, and raidstate
$sortedNonpartnerDisks | Format-Table -Property DiskType,Aggregate,RaidState -AutoSize
Happy scripting!