Bonjour a tous
je cherche a crée un partage réseau en testant leur exitance avant la création
j'ai essayer ces 3 lignes mais j'ai toujours d'erreur
Code PowerShell : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 try{ if(!(Get-SMBShare -Name Migration -ea 0)) {New-SmbShare Name Migration Path c:\migration FullAccess Utilisateurs authentifiés | Out-Null} } catch{ write-error $_ exit }
j'ai toujours la même erreur qui a une idée svp
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 New-SmbShare : Le fichier spécifié est introuvable. Au caractère Ligne:4 : 10 + {New-SmbShare –Name Migration –Path c:\migration –FullAccess ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (MSFT_SMBShare:ROOT/Microsoft/Windows/SMB/MSFT_SMBShare) [New-SmbShare], CimException + FullyQualifiedErrorId : Windows System Error 2,New-SmbShare
Partager