Add DSC configurations for user interface, Windows features, and services; implement app installation and removal scripts
- Created `DSC-UserInterfaceConfiguration.ps1` to manage user interface settings via registry changes. - Developed `DSC-WindowsFeatures.ps1` to install OpenSSH Client and enable NFS Client features. - Implemented `DSC-WindowsServices.ps1` to ensure Terminal Services are running and set to automatic startup. - Added `PS-InstallApps.ps1` to manage app installations and remove the msstore source if it exists. - Created `PS-RemoveApps.ps1` to remove unwanted apps, provisioned packages, and handle Office applications via winget.
This commit is contained in:
464
DSC-UserInterfaceConfiguration.ps1
Normal file
464
DSC-UserInterfaceConfiguration.ps1
Normal file
@@ -0,0 +1,464 @@
|
||||
Configuration UserInterfaceConfiguration {
|
||||
Import-DscResource -ModuleName PSDesiredStateConfiguration
|
||||
|
||||
Node localhost {
|
||||
|
||||
# === TASKBAR WIDGETS ===
|
||||
|
||||
# Disable Taskbar Widgets (Windows 11)
|
||||
Registry DisableTaskbarWidgets {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32"
|
||||
ValueName = "(Default)"
|
||||
ValueType = "String"
|
||||
ValueData = ""
|
||||
}
|
||||
|
||||
# === KEYBOARD & INPUT SETTINGS ===
|
||||
|
||||
# Disable Print Screen key for Snipping Tool
|
||||
Registry DisablePrintScreenSnipping {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\Control Panel\Keyboard"
|
||||
ValueName = "PrintScreenKeyForSnippingEnabled"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Configure Sticky Keys
|
||||
Registry ConfigureStickyKeys {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\Control Panel\Accessibility\StickyKeys"
|
||||
ValueName = "Flags"
|
||||
ValueType = "String"
|
||||
ValueData = "506"
|
||||
}
|
||||
|
||||
# Configure Keyboard Response
|
||||
Registry ConfigureKeyboardResponse {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\Control Panel\Accessibility\Keyboard Response"
|
||||
ValueName = "Flags"
|
||||
ValueType = "String"
|
||||
ValueData = "122"
|
||||
}
|
||||
|
||||
# === EXPLORER SETTINGS ===
|
||||
|
||||
# Disable Cloud Files in Quick Access
|
||||
Registry DisableCloudFilesQuickAccess {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
|
||||
ValueName = "ShowCloudFilesInQuickAccess"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Disable Frequent folders
|
||||
Registry DisableShowFrequent {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
|
||||
ValueName = "ShowFrequent"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Disable Recent files
|
||||
Registry DisableShowRecent {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer"
|
||||
ValueName = "ShowRecent"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Open File Explorer to This PC
|
||||
Registry LaunchToThisPC {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
ValueName = "LaunchTo"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# Show file extensions
|
||||
Registry ShowFileExtensions {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
ValueName = "HideFileExt"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Show hidden files
|
||||
Registry ShowHiddenFiles {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
||||
ValueName = "Hidden"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# Disable AutoComplete append completion
|
||||
Registry DisableAutoCompleteAppend {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete"
|
||||
ValueName = "Append Completion"
|
||||
ValueType = "String"
|
||||
ValueData = "no"
|
||||
}
|
||||
|
||||
# Hide Recently Added Apps
|
||||
Registry HideRecentlyAddedApps {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||
ValueName = "HideRecentlyAddedApps"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# === TASKBAR SETTINGS ===
|
||||
|
||||
# Set Taskbar alignment to left
|
||||
Registry TaskbarAlignLeft {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\microsoft\windows\currentversion\explorer\advanced"
|
||||
ValueName = "TaskbarAl"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Hide Search box from taskbar
|
||||
Registry HideSearchBox {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search"
|
||||
ValueName = "SearchboxTaskbarMode"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Hide Meet Now button
|
||||
Registry HideMeetNow1 {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
|
||||
ValueName = "HideSCAMeetNow"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry HideMeetNow2 {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer"
|
||||
ValueName = "HideSCAMeetNow"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# Disable News and Interests
|
||||
Registry DisableNewsAndInterests {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Policies\Microsoft\Dsh"
|
||||
ValueName = "AllowNewsAndInterests"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Hide People Bar
|
||||
Registry HidePeopleBar1 {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||
ValueName = "HidePeopleBar"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry HidePeopleBar2 {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer"
|
||||
ValueName = "HidePeopleBar"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry DisablePeopleBand {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People"
|
||||
ValueName = "PeopleBand"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Disable Windows Feeds
|
||||
Registry DisableWindowsFeeds {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds"
|
||||
ValueName = "EnableFeeds"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# === THEME & APPEARANCE ===
|
||||
|
||||
# Set Dark theme for apps
|
||||
Registry DarkThemeApps {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
ValueName = "AppsUseLightTheme"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Set Dark theme for system
|
||||
Registry DarkThemeSystem {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
ValueName = "SystemUsesLightTheme"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# Enable transparency effects
|
||||
Registry EnableTransparency {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize"
|
||||
ValueName = "EnableTransparency"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# === REMOTE DESKTOP SETTINGS ===
|
||||
|
||||
# Enable Remote Desktop
|
||||
Registry EnableRDP1 {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server"
|
||||
ValueName = "fDenyTSConnections"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry EnableRDP2 {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server"
|
||||
ValueName = "fSingleSessionPerUser"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry EnableTermService {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Services\TermService"
|
||||
ValueName = "Start"
|
||||
ValueType = "DWord"
|
||||
ValueData = "2"
|
||||
}
|
||||
|
||||
Registry EnableRDPWD {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Services\RDPWD"
|
||||
ValueName = "Start"
|
||||
ValueType = "DWord"
|
||||
ValueData = "2"
|
||||
}
|
||||
|
||||
Registry EnableRDPTcp {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Services\RDP-Tcp"
|
||||
ValueName = "Start"
|
||||
ValueType = "DWord"
|
||||
ValueData = "2"
|
||||
}
|
||||
|
||||
Registry EnableRDPPolicy {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services"
|
||||
ValueName = "fDenyTSConnections"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# === MPC-HC MEDIA PLAYER SETTINGS ===
|
||||
|
||||
Registry MPCHCKeepHistory {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "KeepHistory"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCRememberFilePos {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "RememberFilePos"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCRememberPosAudio {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "RememberPosForAudioFiles"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCAfterPlayback {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "AfterPlayback"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCRememberWindowPos {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "RememberWindowPos"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry MPCHCRememberWindowSize {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "RememberWindowSize"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry MPCHCLoopFolder {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "LoopFolderOnPlayNextFile"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCLockNoPause {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "LockNoPause"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCPreventDisplaySleep {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "PreventDisplaySleep"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry MPCHCShufflePlaylist {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "ShufflePlaylistItems"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCRememberPlaylist {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "RememberPlaylistItems"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCHidePlaylistFullScreen {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "HidePlaylistFullScreen"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCLoop {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "Loop"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry MPCHCUpdaterAutoCheck {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "UpdaterAutoCheck"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
Registry MPCHCUpdaterDelay {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\MPC-HC\MPC-HC\Settings"
|
||||
ValueName = "UpdaterDelay"
|
||||
ValueType = "DWord"
|
||||
ValueData = "0"
|
||||
}
|
||||
|
||||
# === NETWORK SETTINGS ===
|
||||
|
||||
# TCP Window Size optimization
|
||||
Registry TcpWindowSize {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
|
||||
ValueName = "TcpWindowSize"
|
||||
ValueType = "DWord"
|
||||
ValueData = "16711680"
|
||||
}
|
||||
|
||||
Registry GlobalMaxTcpWindowSize {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters"
|
||||
ValueName = "GlobalMaxTcpWindowSize"
|
||||
ValueType = "DWord"
|
||||
ValueData = "16711680"
|
||||
}
|
||||
|
||||
# === APPLICATION SETTINGS ===
|
||||
|
||||
# ShareX Settings
|
||||
Registry ShareXDisableUpdateCheck {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\ShareX"
|
||||
ValueName = "DisableUpdateCheck"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
Registry ShareXDisableUpload {
|
||||
Ensure = "Present"
|
||||
Key = "HKLM:\SOFTWARE\ShareX"
|
||||
ValueName = "DisableUpload"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
|
||||
# Firefox Default Search Engine
|
||||
Registry FirefoxDefaultSearch {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\Policies\Mozilla\Firefox\SearchEngines"
|
||||
ValueName = "Default"
|
||||
ValueType = "String"
|
||||
ValueData = "DuckDuckGo"
|
||||
}
|
||||
|
||||
# ACDSee Settings
|
||||
Registry ACDSeeSettings {
|
||||
Ensure = "Present"
|
||||
Key = "HKCU:\SOFTWARE\ACD Systems\LUXEA Pro\080\LClient"
|
||||
ValueName = "cod"
|
||||
ValueType = "DWord"
|
||||
ValueData = "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Generate the MOF file
|
||||
UserInterfaceConfiguration -OutputPath "\temp\DSC\UserInterfaceConfiguration"
|
||||
|
||||
# Apply the configuration
|
||||
Start-DscConfiguration -Path "\temp\DSC\UserInterfaceConfiguration" -Wait -Verbose -Force
|
||||
Reference in New Issue
Block a user