Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with New-NetShare related to WMI #12

Open
daoudi93 opened this issue Oct 13, 2023 · 4 comments
Open

Issue with New-NetShare related to WMI #12

daoudi93 opened this issue Oct 13, 2023 · 4 comments

Comments

@daoudi93
Copy link

trying to create share on NetApp CVO (cloud volumes) it is returning WMI errors, the current logged in account is built-in Administrator on the SVM

PS C:\Windows\system32> New-NetShare -Name "testscript" -Path "/EUWDRVolume01_share/G_Drive/testfromCVO" -Server 10.82.72.8
Error during NetShareAdd: The parameter is incorrect (Win32 ErrorCode 87 - 0x00000057)
At C:\Program Files\WindowsPowerShell\Modules\FileShareUtils\1.0.24\FileShareUtils.psm1:1131 char:13

  •         Throw ("Error during NetShareAdd: " + (Get-LastWin32Excep ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Error during Ne...7 - 0x00000057):String) [], RuntimeException
    • FullyQualifiedErrorId : Error during NetShareAdd: The parameter is incorrect (Win32 ErrorCode 87 - 0x00000057)
@CamFlyerCH
Copy link
Owner

Is there a share already ? Could you please list this share with Get-NetFileShares -Server 10.82.72.8 ?
I think in your path parameter is incorrect. It should start with C:\ or another drive letter.

@daoudi93
Copy link
Author

Hi

yes SMB Shares are showing when trying to retrieve them
PS C:\Users\1480> Get-NetFileShares -Server 10.82.72.8 |Select name, path

Name Path


EUWDRVolume01_share C:
BISAM Team C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\BISAM Team
AF_FA_ExternalAudit C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\External Audit
3. Data for KPMG C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\External Audit\2017\1. Council Audit Work...
DMS_General Services C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services
GS_Contracts_MasterSheet C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Facilities Management\Se...
GS_FM_MDS&IT_Contracts C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Facilities Management\Se...
GS_MubadalaAuditing_2023_WSP C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Hard Services\71. MUBADA...
GS_Procurement_MDS C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Procurement\Market Data ...
GS_SoftServices_EmployeeServices C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Soft Services\Employee S...
Hotels C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Soft Services\Hotels
SoftServices_Hotel_Bills_Final C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\General Services\Soft Services\Hotels\Res...
DMS_Human Resources C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Human Resources
DMS_HR_ER_JobDescriptions C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Human Resources\Employee Relations!! Job...
ManPowerPlanning-2023 C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Human Resources\International Recruitment...
PDF-Chart C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Human Resources\Org. Chart\Org. Chart 202...
MA-HR C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\MA-HR
DMS_Management Accounts C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Management Accounts
Secnet C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Secnet
Test C:\EUWVolume_DRShare\PAPHOM02-ABT_D_Drive\Test
PrivateEquity-New C:\EUWVolume_DRShare\PAPHOM02-ABT_E_Drive\PrivateEquity
AFS_PerformanceCalculations_B... C:\EUWVolume_DRShare\PAPHOM02-ABT_F_Drive\AccountingFinancial\AFS Performance and R...
AFS-Data C:\EUWVolume_DRShare\PAPHOM02-ABT_F_Drive\AccountingFinancial\AFS-Data
RiskManagement-Department C:\EUWVolume_DRShare\PAPHOM02-ABT_F_Drive\RiskManagement-Department
RM_AuditedFinancials C:\EUWVolume_DRShare\PAPHOM02-ABT_F_Drive\RiskManagement-Department\RM_AuditedFinan...

my issue is only when trying to create a new file shares, just to let you know, the storage is NetApp Cloud Volume

@CamFlyerCH
Copy link
Owner

Thanks. I am shure now, that your fault is the path you use in your command. Try it like this:

New-NetShare -Name "testscript" -Path "C:\EUWDRVolume01_share\G_Drive\testfromCVO" -Server 10.82.72.8

You have to use C:\ and backslashes ( \ )
Check also the backup script I added that prepares cemmands to (re-)create shares as they where during backup. It is easy to just change the share-name and create a second share on the same path.
Backup-Shares.ps1

@daoudi93
Copy link
Author

thanks alot for your quick reply, actually when I was trying with C:\ path i'm getting an error.

New-NetShare -Name "testscript" -Path "C:\EUWDRVolume01_share\G_Drive\testfromCVO" -Server 10.82.72.8
Error during NetShareAdd: The system cannot find the path specified (Win32 ErrorCode 3 - 0x00000003)
At C:\Program Files\WindowsPowerShell\Modules\FileShareUtils\1.0.24\FileShareUtils.psm1:1131 char:13

  •         Throw ("Error during NetShareAdd: " + (Get-LastWin32Excep ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Error during Ne...3 - 0x00000003):String) [], RuntimeException
    • FullyQualifiedErrorId : Error during NetShareAdd: ### The system cannot find the path specified (Win32 ErrorCode 3 - 0x00000003)

the backend storage is NetApp Cloud Volume and actually the path on the system has to be in the format /EUWDRVolume01_share/G_Drive/testfromCVO, and the error i'm getting is Incorrect parameters,

New-NetShare -Name "testscript" -Path "/EUWDRVolume01_share/G_Drive/testfromCVO" -Server 10.82.72.8
Error during NetShareAdd: The parameter is incorrect (Win32 ErrorCode 87 - 0x00000057)
At C:\Program Files\WindowsPowerShell\Modules\FileShareUtils\1.0.24\FileShareUtils.psm1:1131 char:13

  •         Throw ("Error during NetShareAdd: " + (Get-LastWin32Excep ...
    
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Error during Ne...7 - 0x00000057):String) [], RuntimeException
    • FullyQualifiedErrorId : Error during NetShareAdd: The parameter is incorrect (Win32 ErrorCode 87 - 0x00000057)

when using Windows based shares it is working fine on other windows file servers, the problem I'm facing is just only with NetApp storage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants