dsccommunity / dsccommunity/ComputerManagementDsc
Resource to handle SmartScreen Filter
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 338
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
I used this script to turn off Smart Screen filter. I suggest we make this into a resource, or add this as a parameter to an existing resource.
I do not know if this module is the correct one for this. If not, let me know and I will submit this in the correct module.
If there is a better way to accomplish this, then please let me know. 😄
Script (New-ResourceName -Name 'EnableSmartScreenFilter')
{
SetScript = {
<#
'Off' equals off.
'Prompt' equals 'Warn before running an unrecognized app, but don't require administrator approval'.
'RequireAdmin' equals 'Get administrator approval before running an unrecognizd app from the Internet (recommended)'
#>
Set-ItemProperty -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer -Name SmartScreenEnabled -ErrorAction Stop -Value 'RequireAdmin' -Force
}
TestScript = {
$smartFilterStatus = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name SmartScreenEnabled -ErrorAction SilentlyContinue).SmartScreenEnabled
return ($smartFilterStatus -eq 'RequireAdmin')
}
GetScript = {
$smartFilterStatus = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer' -Name SmartScreenEnabled -ErrorAction SilentlyContinue).SmartScreenEnabled
return @{
SmartFilterStatus = $smartFilterStatus
}
}
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the proposed PowerShell DSC script and the SmartScreen Filter FAQ, then compare the registry setting with the repository’s existing resource structure. Decide whether SmartScreen belongs in a new resource or an existing resource parameter, and verify that configuration, testing, and retrieval consistently handle the proposed SmartScreenEnabled values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100