Set-SmbShare
Set-SmbShare
Modifies the properties of the Server Message Block (SMB) share.
Sintassi
Parameter Set: InputObject (cdxml)
Set-SmbShare -InputObject <CimInstance[]> [-AsJob] [-CachingMode <CachingMode> ] [-CATimeout <UInt32> ] [-CimSession <CimSession[]> ] [-ConcurrentUserLimit <UInt32> ] [-ContinuouslyAvailable <Boolean> ] [-Description <String> ] [-EncryptData <Boolean> ] [-FolderEnumerationMode <FolderEnumerationMode> ] [-Force] [-PassThru] [-SecurityDescriptor <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: Query
Set-SmbShare [-Name] <String[]> [[-ScopeName] <String[]> ] [-AsJob] [-CachingMode <CachingMode> ] [-CATimeout <UInt32> ] [-CimSession <CimSession[]> ] [-ConcurrentUserLimit <UInt32> ] [-ContinuouslyAvailable <Boolean> ] [-Description <String> ] [-EncryptData <Boolean> ] [-FolderEnumerationMode <FolderEnumerationMode> ] [-Force] [-PassThru] [-SecurityDescriptor <String> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descrizione dettagliata
The Set-SMBShare cmdlet modifies the properties of the Server Message Block (SMB) share.
Parametri
-AsJob
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-CachingMode<CachingMode>
Specifies the caching mode of the offline files for the SMB share. There are five different caching modes:
-- None: Prevents users from storing documents and programs offline.
-- Manual: Allows users to identify the documents and programs that they want to store offline.
-- Programs: Automatically stores documents and programs offline.
-- Documents: Automatically stores documents offline.
-- BranchCache: Enables BranchCache and manual caching of documents on the shared folder.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-CATimeout<UInt32>
Specifies the continuous availability timeout of the SMB share.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-CimSession<CimSession[]>
Esegue il cmdlet in una sessione remota o in un computer remoto. Immettere un nome di computer o un oggetto di sessione, ad esempio l'output del cmdlet New-CimSession o Get-CimSession. Il valore predefinito è la sessione corrente nel computer locale.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-ConcurrentUserLimit<UInt32>
Specifies the maximum number of concurrently connected users that the new SMB share may accommodate. If this parameter is set to zero (0), then the number of users is unlimited. By default, new SMB shares have no limit on the number of concurrent connections.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-ContinuouslyAvailable<Boolean>
Indicates that the share is continuously available.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-Description<String>
Specifies an optional description of the SMB share. A description of the share can be displayed by running the Get-SMBShare cmdlet. Specify an empty string to clear the current description. The description may not contain more than 256 characters.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-EncryptData<Boolean>
Indicates that the SMB share is encrypted.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-FolderEnumerationMode<FolderEnumerationMode>
Specifies which files and folders in the new SMB share will be visible to the users. I valori accettabili per questo parametro sono:
-- AccessBased: SMB will not the display the files and folders for a share to a user unless that user has rights to access the files and folders. By default, access-based enumeration is disabled for new SMB shares.
-- Unrestricted: SMB will display files and folders to a user even when the user does not have permission to access those items.
The default value is Unrestricted.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-Force
Forza l'esecuzione del comando senza chiedere conferma all'utente.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-InputObject<CimInstance[]>
Specifica l'input inviato al cmdlet. È possibile usare questo parametro oppure reindirizzare l'input al cmdlet.
Alias |
nessuno |
Obbligatorio? |
true |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByValue) |
Accetta caratteri jolly? |
false |
-Name<String[]>
Specifies the name of one or more SMB shares.
Alias |
nessuno |
Obbligatorio? |
true |
Posizione? |
2 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-PassThru
Restituisce un oggetto che rappresenta l'elemento in uso. Per impostazione predefinita, il cmdlet non genera alcun output.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-ScopeName<String[]>
Specifies the scope name of the SMB share.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
3 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-SecurityDescriptor<String>
Specifies the security descriptor for the SMB share in string format.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-ThrottleLimit<Int32>
Specifica il numero massimo di operazioni simultanee che è possibile stabilire per eseguire il cmdlet. Se il parametro viene omesso o si specifica il valore 0
, Windows PowerShell® calcola un valore limite ottimale per il cmdlet basato sul numero di cmdlet CIM in esecuzione nel computer. Questo valore limite si applica solo al cmdlet corrente, non alla sessione o al computer.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-Confirm
Richiede conferma prima di eseguire il cmdlet.
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
False |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-WhatIf
Mostra gli effetti dell'esecuzione del cmdlet. Il cmdlet non viene eseguito.
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
False |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
<CommonParameters>
Questo cmdlet supporta i parametri comuni: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Per altre informazioni, vedere about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Input
Il tipo di input è il tipo degli oggetti che è possibile reindirizzare al cmdlet.
- None
Output
Il tipo di output corrisponde al tipo di oggetti generati dal cmdlet.
Microsoft.Management.Infrastructure.CimInstance#ROOT/Microsoft/Windows/SMB/MSFT_SmbShare
The MSFT_SmbShare object represents the modified share.
Esempi
EXAMPLE 1
This example modifies the properties of an SMB share.
PS C:\> Set-SmbShare -Name VMFiles -EncryptData $true
EXAMPLE 2
This example modifies the properties of an SMB share without user confirmation.
PS C:\> Set-SmbShare -Name VMFiles -EncryptData $true -Force