Bedingte Aktionen Configuration ManagerConfiguration Manager Conditional Actions
Configuration Manager Aktionen können gemäß den angegebenen Bedingungen angezeigt werden.Configuration Manager actions can be displayed according to specified conditions. Die Bedingungen werden wie folgt definiert:The conditions are defined by the following:
Reguläre AusdrückeRegular expressions
MethodenaufrufeMethod calls
SicherheitsberechtigungenSecurity permissions
Reguläre AusdrückeRegular Expressions
Reguläre Ausdrücke ermöglichen das Anwenden von Zeichen folgen basierten Suchmustern.Regular expressions allow you to apply string-based search patterns. Die folgenden Elemente geben einen regulären Ausdruck für eine Aktion an:The following elements specify a regular expression for an action:
ElementElement | BeschreibungDescription |
---|---|
MatchPattern |
Gibt das zu suchende Muster an.Specifies the pattern to search for. |
MatchValueToTest |
Gibt den Wert an, mit dem verglichen werden soll.Specifies the value to compare against. Der folgende Wert ##Sub ist eine Eigenschaft für das ausgewählte Objekt.The value following ##Sub is a property on the selected object. Die-Eigenschaft darf nicht verzögert sein und muss auf dem SELECT-Objekt vorhanden sein.The property must not be lazy and must exist on the select object. |
Mit der folgenden Aktion wird ein Dialogfeld angezeigt, wenn das angegebene Muster (MS_ASYNC_RAS) mit der-Eigenschaft des ausgewählten Objekts übereinstimmt AddressType
:The following action displays a dialog box whenever the specified pattern (MS_ASYNC_RAS) matches the selected object's AddressType
property:
<ActionDescription ActionVerb="Properties" Class="ShowDialog"> <ShowOn> <string>DefaultContextualTab</string> <!-- Show on Ribbon --> <string>ContextMenu</string> <!-- Show on Context Menu --> </ShowOn> <MatchPattern>MS_ASYNC_RAS</MatchPattern>
<MatchValueToTest>##SUB:AddressType##</MatchValueToTest>
<DialogId>AsyncRasSenderAddress</DialogId></ActionDescription>
MethodenaufrufeMethod Calls
Eine Aktion kann abhängig vom Ergebnis eines Methoden Aufrufes angezeigt werden.An action can be shown depending on the result of a method call. Das untergeordnete ActionDescription
ActionStateAssembly
-Element definiert die Assembly, den Typ und die Methode, die aufgerufen werden sollen.The ActionDescription
child element ActionStateAssembly
defines the assembly, type, and method to be called. Wenn die-Methode zurückgibt true
, wird die-Aktion angezeigt. wenn die Methode zurückgibt false
, wird die Aktion ausgeblendet.If the method returns true
, the action is shown; if the method returns false
, the action is hidden.
Der folgende XML-Code Ruft eine Methode EnableDecrementPriorityMenu
mit dem Namen in der Assembly AdminUI.Addresses.dll auf:The following XML calls a method named EnableDecrementPriorityMenu
in the assembly AdminUI.Addresses.dll:
<ActionDescription>
<ShowOn>
<string>DefaultContextualTab</string> <!-- Show on Ribbon --> <string>ContextMenu</string><!-- Show on Context Menu --> </ShowOn> <ActionStateAssembly>
<Assembly>AdminUI.Addresses.dll</Assembly> <Type>Microsoft.ConfigurationManagement.AdminConsole.Addresses.AddressUtilityClass</Type>
<Method>EnableDecrementPriorityMenu</Method> </ActionStateAssembly>
</ActionDescription>
Die-Methode wird in einer .NET Framework-Assembly mit der folgenden Signatur implementiert:The method is implemented in a .NET Framework assembly with the following signature:
public static bool EnableDecrementPriority(object sender, ScopeNode scopeNode, ActionDescription action, ResultObjectBase resultObject)
Weitere Informationen zum Aufrufen von Methoden in einer .NET Framework-Assembly finden Sie unter Configuration Manager AssemblyType-Aktion.For more information about calling methods in a .NET Framework assembly, see Configuration Manager AssemblyType Action.
SicherheitsberechtigungenSecurity Permissions
Sie können die Verfügbarkeit einer Aktion einschränken, indem Sie Sicherheitseinschränkungen auf das ausgewählte Objekt oder die Objektklasse anwenden.You can restrict the availability of an action by applying security restrictions to the selected object or object class.
ObjektinstanzberechtigungenObject Instance Permissions
Sie können die Verfügbarkeit einer Aktion einschränken, indem Sie die erforderlichen Berechtigungen für das ausgewählte Objekt anwenden.You can restrict the availability of an action by applying required permissions to the selected object. Im folgenden XML-Beispiel geben die folgenden Elemente die Instanzberechtigungen für das ausgewählte Objekt an:In the following XML example, the following elements specify the instance permissions for the selected object:
ElementElement | BeschreibungDescription |
---|---|
InstancePermissions |
Das übergeordnete Element der Liste der Instanzberechtigungen.The parent element to the list of instance permissions. |
SecurityFlagsDetailDescription |
Die sicherheitsflags, die festgelegt werden müssen, damit die Aktion funktioniert.The security flags that must be set for the action to work. |
Im folgenden XML-Beispiel ist die Delete
Aktion für ein ausgewähltes Objekt nur verfügbar, wenn der Benutzer über die Berechtigung "ändern" verfügt:In the following XML example, the Delete
action for a selected object is available only if the user has modify permissions:
<ActionDescription ActionVerb="Delete" Class="Default" SelectionMode="Both" InstanceDependsOn="SMS_Site">
<ShowOn> <string>DefaultContextualTab</string> <!-- Show on Ribbon --> <string>ContextMenu</string> <!-- Show on Context Menu --></ShowOn><InstancePermissions><SecurityFlagsDetailDescription BitName="Modify" BitValue="2" DependsOn="1" /></InstancePermissions>
</ActionDescription>
Objektklassen BerechtigungenObject Class Permissions
Sie können das- ClassPermissions
Element verwenden, um die für eine Aktion erforderlichen Objektklassen Berechtigungen festzulegen.You can use the ClassPermissions
element to set the object class permissions required for an action. In " aktionsecuritydescription " werden die Objektklasse und die erforderlichen Berechtigungen für diese Objektklasse beschrieben.ActionSecurityDescription describes the object class and the required permissions for that object class. Im folgenden XML-Beispiel werden die für SMS-Sammlungen erforderlichen Berechtigungen beschrieben:The following XML example describes the permissions required for SMS collections:
<ClassPermissions> <ActionSecurityDescription ClassObject="SMS_Collection" RequiredPermissions="1280" />
</ClassPermissions>
Berechtigungs WertePermission Values
Die Berechtigungs Werte für das Attribut "Requirements drequirements " sind identisch mit denen für die Klasse " securityflagsdetaildescription " und lauten wie folgt:The permission values for the RequiredPermissions attribute are the same as for the SecurityFlagsDetailDescription class and are as follows:
BerechtigungPermission | WerteValues | Abhängig vonDepends on |
---|---|---|
LesenRead | 11 | KeineNone |
ÄndernModify | 22 | 11 |
LöschenDelete | 44 | 11 |
VerteilenDistribute | 88 | 11 |
CreateChildCreateChild | 1616 | 11 |
RemotecontrolRemoteControl | 3232 | KeineNone |
AnkündigenAdvertise | 6464 | 11 |
ModifyresourceModifyResource | 128128 | 11 |
VerwaltenAdminister | 256256 | 77 |
DeleteresourceDeleteResource | 512512 | 11 |
ErstellenCreate | 10241024 | KeineNone |
ViewcollectedfilesViewCollectedFiles | 20482048 | 11 |
Ressource lesenReadResource | 40964096 | 11 |
DelegatDelegate | 81928192 | KeineNone |
ZählerMeter | 1638416384 | 11 |
ManagesqlcommandManageSqlCommand | 3276832768 | 11 |
Managestatus FilterManageStatusFilter | 6553665536 | 11 |
ManagefolderManageFolder | 131072131072 | 11 |
Network AccessNetworkAccess | 262144262144 | 11 |
ImportmachineentryImportMachineEntry | 524288524288 | 11 |
"Kreatemediacertificate"CreateMediaCertificate | 10485761048576 | 11 |
ModifycollectionsettingModifyCollectionSetting | 20971522097152 | 11 |
ManageosdcertificateManageOsdCertificate | 41943044194304 | 11 |
Weitere InformationenSee Also
Configuration Manager Aktionen Configuration Manager Actions
Configuration Manager Action-XML Configuration Manager Action XML
Configuration Manager AssemblyType-Aktion Configuration Manager AssemblyType Action
Ausführbare Configuration Manager Aktion Configuration Manager Executable Action
Configuration Manager Gruppenaktion Configuration Manager Group Action
Aktion "Configuration Manager Bericht" Configuration Manager Report Action
Configuration Manager Show Dialog-Aktion Configuration Manager ShowDialog Action
Erstellen einer Configuration Manager Aktion How to Create a Configuration Manager Action
Suchen einer Configuration Manager Knoten-GUIDHow to Find a Configuration Manager Node GUID