Having this issue where folder I create sometimes become hidden folders and others going hidden AND made into system folders.
Using cmd.exe and the attrib command does not appear to work as expected.
So for example if my hidden folder is d:\mydir\myhiddendir
attrib -S -H d:\mydir /S /D
This does not work
What I found did work was this:
Set-Location D:\mydir
Get-ChildItem -Attributes Hidden | Foreach-Object { $_.Attributes = 'Normal' }