*.wsf) to
set an (arbitrary)
AppLocker
policy with just one double-click.
Note: the script requires neither
PowerShell
with its
AppLocker cmdlets
nor
Microsoft Management Console
with its GPEdit.msc and SecPol.msc
snap-ins.
*.wsf to set an
AppLocker
policy and activate it.
Create a text file *.wsf, for example
AppLocker.wsf, with the following content in an
arbitrary directory:
<?xml version='1.0' encoding='US-ASCII' standalone='yes' ?>
<package>
<job>
<object id='Application' progid='Shell.Application' />
<runtime>
<description>Set an AppLocker Policy on Windows 7 and later versions</description>
</runtime>
<script language='JScript'>
if (WScript.Arguments.Count() != 0)
WScript.Arguments.ShowUsage()
else
Application.ShellExecute(WScript.FullName, '//Job:Policy ' + WScript.ScriptFullName, WScript.Path, 'RunAs', 1)
</script>
</job>
<job id='Policy'>
<object id='AppIdPolicyHandler' classid='clsid:F1ED7D4C-F863-4DE6-A1CA-7253EFDEE1F3' />
<object id='Application' progid='Shell.Application' />
<resource id='Policy'><![CDATA[<AppLockerPolicy Version='1' />]]></resource>
<script language='JScript'>
if (Application.IsServiceRunning('AppIdSvc') == 0)
Application.ServiceStart('AppIdSvc', 1)
AppIdPolicyHandler.SetPolicy('', getResource('Policy'))
</script>
</job>
</package>
Replace the highlighted
XML snippet
– an (empty) allow all
AppLocker
policy – with the one you wish to deploy, for example the
generic
AppLocker
policy for Windows 11 presented by the
Eleventh Commandment,
then save the modified Windows Script File.
Run the Windows Script File modified in step 2. per double-click.
Note: it requires Administrator rights and requests them via User Account Control if necessary.
Restart Windows to activate the just set AppLocker policy.
Get-AppLockerFileInformationGet-AppLockerPolicyNew-AppLockerPolicySet-AppLockerPolicyTest-AppLockerPolicySaferCloseLevel()SaferComputeTokenFromLevel()SaferCreateLevel function()SaferGetLevelInformation()SaferGetPolicyInformation()SaferIdentifyLevel()SaferRecordEventLogEntry()SaferSetLevelInformation()SaferSetPolicyInformation()SaferiIsExecutableFileType()Use the X.509 certificate to send S/MIME encrypted mail.
Note: email in weird format and without a proper sender name is likely to be discarded!
I dislike
HTML (and even
weirder formats too) in email, I prefer to receive plain text.
I also expect to see your full (real) name as sender, not your
nickname.
I abhor top posts and expect inline quotes in replies.
as iswithout any warranty, neither express nor implied.
cookiesin the web browser.
The web service is operated and provided by
Telekom Deutschland GmbH The web service provider stores a session cookie
in the web
browser and records every visit of this web site with the following
data in an access log on their server(s):