Notes
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de vous connecter ou de modifier des répertoires.
L’accès à cette page nécessite une autorisation. Vous pouvez essayer de modifier des répertoires.
Contient la taille actuelle de la superposition UWF (Unified Write Filter) et gère les seuils critiques et d’avertissement pour la taille de superposition.
Syntaxe
class UWF_Overlay {
[key] string Id;
[read] UInt32 OverlayConsumption;
[read] UInt32 AvailableSpace;
[read] UInt32 CriticalOverlayThreshold;
[read] UInt32 WarningOverlayThreshold;
UInt32 GetOverlayFiles(
[in] string Volume,
[out, EmbeddedInstance("UWF_OverlayFile")] string OverlayFiles[]
);
UInt32 SetWarningThreshold(
UInt32 size
);
UInt32 SetCriticalThreshold(
UInt32 size
);
};
Membres
Les tableaux suivants répertorient toutes les méthodes et propriétés qui appartiennent à cette classe.
Méthodes | Description |
---|---|
UWF_Overlay.GetOverlayFiles | Retourne la liste des fichiers d’un volume qui ont été mis en cache dans la superposition UWF. |
UWF_Overlay.SetWarningThreshold | Définit le seuil d’avertissement pour la surveillance de la taille de la superposition UWF. |
UWF_Overlay.SetCriticalThreshold | Définit le seuil d’avertissement critique pour la surveillance de la taille de la superposition UWF. |
Propriétés
Propriété | Type de données | Qualificatifs | Description |
---|---|---|---|
ID | chaîne | [key] | ID unique. Cette valeur est toujours définie sur UWF_Overlay. |
OverlayConsumption | Uint32 | [read] | Taille actuelle, en mégaoctets, de la superposition UWF. |
AvailableSpace | Uint32 | [read] | Quantité d’espace libre, en mégaoctets, disponible pour la superposition UWF. |
CriticalOverlayThreshold | Uint32 | [read] | Taille du seuil critique, en mégaoctets. UWF envoie un événement de notification de seuil critique lorsque la taille de superposition UWF atteint ou dépasse cette valeur. |
WarningOverlayThreshold | Uint32 | [read] | Taille du seuil d’avertissement, en mégaoctets. UWF envoie un événement de notification de seuil d’avertissement lorsque la taille de superposition UWF atteint ou dépasse cette valeur. |
Exemples
L’exemple suivant montre comment utiliser la superposition UWF à l’aide du fournisseur WMI dans un script PowerShell.
$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"
# Function to set the Unified Write Filter overlay warning threshold
function Set-OverlayWarningThreshold($ThresholdSize) {
# Retrieve the overlay WMI object
$OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;
if(!$OverlayInstance) {
"Unable to get handle to an instance of the UWF_Overlay class"
return;
}
# Call the instance method to set the warning threshold value
$retval = $OverlayInstance.SetWarningThreshold($ThresholdSize);
# Check the return value to verify that setting the warning threshold is successful
if ($retval.ReturnValue -eq 0) {
"Overlay warning threshold has been set to " + $ThresholdSize + " MB"
} else {
"Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
}
}
# Function to set the Unified Write Filter overlay critical threshold
function Set-OverlayCriticalThreshold($ThresholdSize) {
# Retrieve the overlay WMI object
$OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;
if(!$OverlayInstance) {
"Unable to get handle to an instance of the UWF_Overlay class"
return;
}
# Call the instance method to set the warning threshold value
$retval = $OverlayInstance.SetCriticalThreshold($ThresholdSize);
# Check the return value to verify that setting the critical threshold is successful
if ($retval.ReturnValue -eq 0) {
"Overlay critical threshold has been set to " + $ThresholdSize + " MB"
} else {
"Unknown Error: " + "{0:x0}" -f $retval.ReturnValue
}
}
# Function to print the current overlay information
function Get-OverlayInformation() {
# Retrieve the Overlay WMI object
$OverlayInstance = Get-WMIObject -namespace $NAMESPACE -class UWF_Overlay;
if(!$OverlayInstance) {
"Unable to get handle to an instance of the UWF_Overlay class"
return;
}
# Display the current values of the overlay properties
"`nOverlay Consumption: " + $OverlayInstance.OverlayConsumption
"Available Space: " + $OverlayInstance.AvailableSpace
"Critical Overlay Threshold: " + $OverlayInstance.CriticalOverlayThreshold
"Warning Overlay Threshold: " + $OverlayInstance.WarningOverlayThreshold
}
# Examples of using these functions
"`nSetting the warning threshold to 768 MB."
Set-OverlayWarningThreshold( 768 )
"`nSetting the critical threshold to 896 MB."
Set-OverlayCriticalThreshold( 896 )
"`nDisplaying the current state of the overlay."
Get-OverlayInformation
Remarques
Un seul UFW_Overlay instance existe pour un système protégé par UWF.
Conditions préalables
Édition de Windows | Pris en charge |
---|---|
Windows Famille | Non |
Windows Pro | Non |
Windows Entreprise | Oui |
Windows Éducation | Oui |
Windows IoT Entreprise | Oui |