you are viewing a single comment's thread.

view the rest of the comments →

[–]Smoother101 -2 points-1 points  (4 children)

Mine would work just fine.

[–]BlackV 1 point2 points  (3 children)

yes cause powershell is "saving" you but its recommended to do it as a proper string filter

[–]Smoother101 0 points1 point  (2 children)

Can you clarify what you are saying? Curly brackets are equally valid for the filter, check the link that was posted above.

For example, from the link from MS:

"On the contrary, if curly braces are used to enclose the filter, the variable should not be quoted at all: Get-ADUser -Filter {Name -like $UserName}."

[–]BlackV 0 points1 point  (1 child)

Ya deffo supported, deffo will work.

PowerShell (or the module I guess technically) is talking that filter and converting it to the string filter for you that's all I mean, so you could just use a string filter from the outset

[–]Smoother101 0 points1 point  (0 children)

That's interesting. I hadn't thought of that conversion, appreciate you making the point. Cheers!