This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| :: Batch script to add "Open with Code" to context menu (proper escaping) | |
| :: Automatically elevates to Admin if needed | |
| :: Source: https://github.com/Vanrou/FixMicrosoft/blob/main/Add_OpenWithCode.bat | |
| :: Check for admin rights | |
| fltmc >nul 2>&1 || ( | |
| echo Requesting administrator privileges... | |
| powershell -Command "Start-Process -Verb RunAs -FilePath '%~0'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region ### BUILD THE CONFIGURATION ### | |
| # Declare the configuration: | |
| Configuration TestDscWithoutWinRm { | |
| Import-DscResource –ModuleName PSDesiredStateConfiguration | |
| node localhost { | |
| File akada { | |
| Ensure = 'Present' | |
| Type = 'File' | |
| Contents = 'Martin was here!' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # From https://github.com/PhilipRieck/MachineSetup/blob/main/Modules/Reboots.psm1 | |
| $script:RebootRequired = $false | |
| function SetRebootRequired($value = $true){ | |
| $script:RebootRequired = $value | |
| } | |
| function IsRebootRequired(){ | |
| return $script:RebootRequired | |
| } |