-addfulltrust
假設已將含有自訂使用權限的使用權限集合加入電腦原則。這個自訂使用權限是實作於 MyPerm.exe 中,而 MyPerm.exe 則是參考 MyOther.exe 中的類別。這兩個組件都必須加入到完全信任組件清單。下列命令會將 MyPerm.exe 組件加入電腦原則的完全信任清單。
caspol -machine -addfulltrust MyPerm.exe
下列命令會將 MyOther.exe 組件加入電腦原則的完全信任清單。
caspol -machine -addfulltrust MyOther.exe
-addgroup
下列命令會將子程式碼群組加入電腦原則程式碼群組階層架構的根 (Root)。新程式碼群組是網際網路區域的成員,並且與 Execution 使用權限集合產生關聯。
caspol -machine -addgroup 1. -zone Internet Execution
下列命令會加入可提供 \\netserver\netshare 近端內部網路權限共用的子節點群組。
caspol -machine -addgroup 1. -url \\netserver\netshare\* LocalIntranet
-addpset
下列命令會將 Mypset 使用權限集合加入使用者原則。
caspol -user -addpset Mypset.xml Mypset
-chggroup
下列命令會將使用權限集合 (位於標記為 1.2. 之程式碼群組的使用者原則內) 變更為 Execution 使用權限集合。
caspol -user -chggroup 1.2. Execution
下列命令會將標記為 1.2.1. 的程式碼群組之預設原則中的成員資格條件變更,並且變更 exclusive 旗標的設定值。成員資格條件被定義成源自於網際網路區域的程式碼,且 exclusive 旗標是開啟的。
caspol -chggroup 1.2.1. -zone Internet -exclusive on
-chgpset
下列命令會將使用名稱為 Mypset 的使用權限集合變更為 newpset.xml 中所包含的使用權限集合。請注意,目前的版本不支援變更正由程式碼群組階層架構使用中的使用權限集合。
caspol -chgpset Mypset newpset.xml
-force
下列命令會使得使用者原則的根程式碼群組 (標記為 1) 與 Nothing 具名使用權限集合產生關聯。這會妨礙 Caspol.exe 執行。
caspol -force -user -chggroup 1 Nothing
-recover
下列命令會將最近儲存的電腦原則復原。
-remgroup
下列命令會將標記為 1.1 的程式碼群組移除。如果這個程式碼群組有任何子程式碼群組,也會刪除這些群組。
-rempset
下列命令會將 Execution 使用權限集合從使用者原則中移除。
caspol -user -rempset Execution
下列命令會將 Mypset 從使用者原則層級中移除。
-resolvegroup
下列命令會顯示 myassembly 所屬之電腦原則的所有程式碼群組。
caspol -machine -resolvegroup myassembly
下列命令會顯示 myassembly 所屬之電腦、企業和指定的自訂使用者原則的所有程式碼群組。
caspol -customall "c:\config_test\security.config" -resolvegroup myassembly
-resolveperm
下列命令會依據電腦和使用者原則層級計算 testassembly 的使用權限。
caspol -all resolveperm testassembly