• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

The specified wildcard pattern is not valid: [

  • Thread starter Thomas Friis Poulsen
  • Start date
T

Thomas Friis Poulsen

#1
Hi All

This:
Get-Acl -Path \\server\f$\Home\B\[Foldername

Gives the error "The specified wildcard pattern is not valid: [foldername
if the share has a folder with a name that include a [
Is this a bug or ???

Best Regards

Thomas
 

My Computer

V

Vadims Podans

#2
if "[" is in filename start, then:
get-acl \\server\f$\Home\B\[[]*

if "[" is in filename middle then:
get-acl \\server\f$\Home\B\*[[]*

if "[" is in filename end, then:
get-acl \\server\f$\Home\B\*[[]

enjoy!
--
WBR Vadims Podans
PowerShell blog: www.sysadmins.lv


"Thomas Friis Poulsen" wrote:

> Hi All
>
> This:
> Get-Acl -Path \\server\f$\Home\B\[Foldername
>
> Gives the error "The specified wildcard pattern is not valid: [foldername
> if the share has a folder with a name that include a [
> Is this a bug or ???
>
> Best Regards
>
> Thomas
 

My Computer

V
#3
so, on my host
PS Z:\test> $host.version

Major Minor Build Revision
----- ----- ----- --------
2 0 -1 -1

all replies marked as Answer don't work now

"Thomas Friis Poulsen" wrote:

> Hi All
>
> This:
> Get-Acl -Path \\server\f$\Home\B\[Foldername
>
> Gives the error "The specified wildcard pattern is not valid: [foldername
> if the share has a folder with a name that include a [
> Is this a bug or ???
>
> Best Regards
>
> Thomas
 

My Computer

Users Who Are Viewing This Thread (Users: 1, Guests: 0)