🕵️♂️
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
| { | |
| "version": "2.0.0", | |
| "tasks": [ | |
| { | |
| "label": "CF Resource List", | |
| "type": "process", | |
| "command": "chrome.exe", | |
| "windows": { | |
| "command": "C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" | |
| }, |
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 admin console window | |
| Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
| choco install python | |
| #now setup for cf-lint | |
| python -m pip install --upgrade pip | |
| pip install cfn-lint |
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
| function Get-FreeDriveLetter { | |
| $regex = "[A-Z]:" | |
| $netuseOutput = net use | |
| $driveArray = @() | |
| $providers = Get-PSDrive -PSProvider FileSystem | |
| $psdriveDriveLetters = $providers.Name | |
| $driveArray += $psdriveDriveLetters | |
| $netuseDriveLetters = ($netuseOutput | Select-String -Pattern $regex).Matches.Value | |
| $netuseDriveLetters = $netuseDriveLetters -replace ':', "" | |
| $driveArray += $netuseDriveLetters |
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
| git clone https://repo_address.git | |
| git add . | |
| git add --all | |
| git commit -m "Initial commit" | |
| git push origin master | |
| git pull origin master | |
| git config user.name "Jake" |
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
| [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "", Justification = "While it has start verb, it doesn't actually change the system state")] |
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
| #get RSOP from a server core device (can be run remotely) | |
| Get-GPResultantSetOfPolicy -Computer Server1 -ReportType Html -Path C:\temp\Server1_SOP.html |
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
| <# | |
| try { | |
| $a = Invoke-WebRequest -Uri $uri -MaximumRedirection 0 -ErrorAction Stop | |
| }#try_Invoke-WebRequest | |
| catch { | |
| #if($_.ErrorDetails.Message -like "*maximum redirection*"){ | |
| if($_.Exception.Message -like "*Moved*"){ | |
| Write-Verbose -Message 'Moved detected.' | |
| #$result = $a.Headers.Location | |
| $result = $a.Exception.Response.Headers.Location.AbsoluteUri |
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
| Get-InstalledModule | Select-Object Name, @{n='Installed';e={$_.Version}}, @{n='Available';e={(Find-Module -Name $_.Name).Version}} | Where-Object {$_.Available -gt $_.Installed} |
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
| ################################################################################ | |
| # The "nice" way to reset the LCM... | |
| if (-not(Test-Path -Path 'C:\Temp')) { $null = New-Item -Path 'C:\Temp' -ItemType 'Directory'} | |
| [DscLocalConfigurationManager()] | |
| Configuration ResetLCM { | |
| Param ( | |
| [String[]] | |
| $NodeName | |
| ) | |
| Node $NodeName { |
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
| cron(Minutes | Hours | Day-of-month | Month | Day-of-week | Year) | |
| cron(0 0/4 * * ? *) Every 4 hours | |
| cron(0 10 * * ? *) 10:00AM UTC everyday | |
| cron(15 12 * * ? *) 12:15PM UTC everyday | |
| cron(0 18 ? * MON-FRI *) 6:00PM UTC every Mon-Fri | |
| cron(0 8 1 * ? *) 8:00AM UTC every first day of the month | |
| cron(0/10 * ? * MON-FRI *) Every 10 min Mon-Fri | |
| cron(0/5 8-17 ? * MON-FRI *)Every 5 minutes Mon-Fri between 8:00AM - 5:55PM UTC | |
| cron(0 9 ? * 2#1 *) 9:00AM UTC first Monday of each month |