I know, sounds a bit out there, but it is possible. My PowerShell Class this week took a question from PowerShell.com. I do this every once and a while so we can apply our newly acquired skill sets to real life situations. This time around we helped out an IT Pro who was importing a CSV file to modify user objects using the Set-ADUser cmdlet of the Active Directory Module for Windows PowerShell. The problem that he was having is that the database that generated this CSV file would occasionally place a NULL value in one of the properties. If you hard code Set-ADUser with a parameter, but then feed it a NULL value, it errors. The same thing happens if you pipe in a NULL value. He needed help trying to fix this. So, we went into action. And generated the cmdlet below. The cool part about this code is that we did not hard code anything with regards to sending data to Set-ADUser. We utilized Invoke-Expression to execute commands that the code generates live. We also did not know if the C...
Welcome to the blogsite of MCTExpert. I am a Microsoft Certified Trainer. Here you will find the real questions that are asked to me by my students.