PCA should only be used on interval type variables.
These are variables where differences and division make sense. Because PCA performs such operations.
So given the student is example: does it make sense to compute the differences of student IDs? Does it make sense to argue that the student IDs of Bob and Sally differ by twice as much as those of Adam and Eve? If not, then you probably shouldn't use PCA not standardization.
It doesn't mean such variables are useless. They may just need to be handled differently. For example phone numbers (used to) have a meaningful area code. Treating phone numbers with PCA is stupid, but treating the area code as a category is okay. It's even better when you can map them to actual cities...