none
Get-GPO command renames all GPOs?

    Question

  • Hi guys!

    Something really weird happened to me yesterday. I was troubleshooting a GPO that was not being accessed by one of the domain controllers (event ID 1058 / 1030 - actually the problem is still on and I will start a discussion about that too because I tried several things and it didin't work, and probably because of this tries that I expirienced the situation I'm about to explain). I used the command Get-GPO in PowerShell. I had used that before and it was pretty OK.

    As usual, I never get the syntax right the first time. I wrote something like that:

    > Get-GPO -ALL | Where {$_.DisplayName -like '*blablabla*'} | Select id, displayname

    > Get-GPO -ALL | Where {$_.id -like '*{I put part of the ID here}*'} | Select id, displayname

    I was trying to identify the GPO that appeared in the  event 1058. I tried sometimes because I was typing it the wrong way and any results appeared. Then I looked for other GPOs that I new existed, using the same syntax, and any results appeared as well.

    For last, I used the command  Get-GPO -All | Select id, displayname . All GPOs were displayed, but the DisplayName was the same to all of them. I'm pretty sure the previous Get-GPO commands I gave were the responsible for that, because the DisplayName of all GPOs were renamed to the same string I used in the previous queries (*blablabla*). I started the gpmc, Users and Computers console, and all GPOs were displayed like *blablabla* , including the asterisk

    Luckly, I was able to rename them with the correct displayname because the displayname in the GPT.INI file under the GPO folder was not changed.

    Do you have any ideas about what may have happened? As I said, all GPOs were renamed with the string I used in the search.

    Friday, October 07, 2016 12:55 PM

Answers

All replies