beginner : parsing "$" character within new-smbshare outlet cmd


hi all,

i newbie here.

i need in order parse "$" character within new-smbshare outlet cmd, here example:

new-smbshare -name "hello$"  -description 'test_hello' -path 'c:\temp' -scopename 'test_3'

i tried escape , simple quote character, not matter what, still gives me same error

if remove $ character works charm...

i following error:

ps c:\windows\system32> new-smbshare -name "hello$"  -description 'test_hello' -path 'c:\temp' -scopename 'test_3'
new-smbshare : parameter incorrect.
@ line:1 char:1
+ new-smbshare -name "hello$"  -description 'test_hello' -path 'c:\temp ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + categoryinfo          : invalidargument: (msft_smbshare:root/microsoft/windows/smb/msft_smbshare) [new-smbshare]
   , cimexception
    + fullyqualifiederrorid : windows system error 87,new-smbshare
    + categoryinfo          : invalidargument: (:) [new-smbshare], parameterbindingexception
    + fullyqualifiederrorid : missingargument,new-smbshare

thank in advance

will.

hi will,

use single quotes instead of double.




Windows Server  >  Windows PowerShell



Comments

  1. Hi,

    tried with Single quotes but getting same error. Please suggest

    ReplyDelete

Post a Comment

Popular posts from this blog

Azure MFA with Azure AD and RDS

Failed to delete the test record dcdiag-test-record in zone test.com

Failed to setup initiator portal. Error status is given in the dump data.