🕵️♂️
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
| #Download the .NET Core 2.1 SDK from https://www.microsoft.com/net/download | |
| Install-Module AWSPowerShell.NetCore | |
| Install-Module AWSLambdaPSCore | |
| Import-Module AWSPowerShell.NetCore | |
| Import-Module AWSLambdaPSCore | |
| Get-Command -Module AWSLambdaPSCore | |
| New-Item PSLambda -ItemType Directory |
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
| #------------------------------------------------------ | |
| #ENABLE WINRM | |
| #https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/enable-psremoting?view=powershell-6 | |
| #according to documentation this runs Set-WSManQuickConfig which basically does all the same stuff as the quickconfig | |
| Enable-PSRemoting | |
| #alternatively use this - but documentation indicates it's not as thorough | |
| winrm quickconfig | |
| #to turn back off: | |
| Disable-PSRemoting | |
| #------------------------------------------------------ |
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
| #install-module ClipboardText | |
| #super fast PS way to create quick JSON | |
| ConvertTo-Json -Compress -InputObject @{ | |
| JsonItem1 = "I Am Item1 content" | |
| JsonItem2 = "I Am Item2 content" | |
| JsonItem3 = "I Am Item3 content" | |
| } | Set-ClipboardText |
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
| <# | |
| .SYNOPSIS | |
| Retrieves specified logs from remote host for time period specified | |
| .DESCRIPTION | |
| Establishes a remote connection to specified device and queries server logs based on user specified criteria. (Log name, Log Level, Start and End times). If user does not provide log search criteria, a set of defaults are set: [System, Application with Critical, Errors, and Warnings for the last 24 hours]. If no logs are found that match the criteria a result is returned to the user to easily place in a ticket or other correspondence. | |
| .EXAMPLE | |
| $creds = Get-Credential;Get-ServerLogs -HostName Server01 -Credential $creds | |
| Retrieves server logs with all defaults: System & Application will be queried for Warning, Error, Critical, for the last 24 hours. User will be prompted to supply creds. | |
| .EXAMPLE |
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
| <# | |
| Most of the modules that ship as part of Windows (for example, DnsClient, Hyper-V, NetTCPIP, Storage, etc.) and other Microsoft products including Azure and Office have not been explicitly ported to .NET Core yet. | |
| By installing the WindowsPSModulePath module, you can use Windows PowerShell modules by appending the Windows PowerShell PSModulePath to your PowerShell Core PSModulePath. | |
| #> | |
| # Add `-Scope CurrentUser` if you're installing as non-admin | |
| Install-Module WindowsPSModulePath -Force | |
| # Add this line to your profile if you always want Windows PowerShell PSModulePath | |
| Add-WindowsPSModulePath |
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
| #C:\Program Files\PowerShell\Modules | |
| #C:\Program Files\WindowsPowerShell\Modules | |
| $a = Get-Module powershellget -ListAvailable | |
| $a.Path | |
| Get-Module -ListAvailable $module | Remove-Module -Force;Install-Module $module -Repository PSGallery -Force -AllowClobber |
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
| "Help": { | |
| "prefix": "help", | |
| "body": [ | |
| "<#", | |
| ".SYNOPSIS", | |
| "\tShort description", | |
| ".DESCRIPTION", | |
| "\tLong description", | |
| ".EXAMPLE", | |
| "\tC:\\PS>", |
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
| # Set variables | |
| $registryPath = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU\" | |
| $name = "UseWUServer" | |
| $value = "0" | |
| $service = "wuauserv" | |
| # Reset variables | |
| $resetValue = Get-ItemPropertyValue -Name $name -Path $registryPath | |
| # Set reg value and restart service |
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
| <# | |
| CoenraadS.bracket-pair-colorizer-2 | |
| DanielThielking.aws-cloudformation-yaml | |
| DavidAnson.vscode-markdownlint | |
| DotJoshJohnson.xml | |
| PKief.material-icon-theme | |
| SirTori.indenticator | |
| Tyriar.shell-launcher | |
| aaron-bond.better-comments | |
| almenon.arepl |
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
| { | |
| //USEFUL INFORMATION | |
| //https://code.visualstudio.com/docs/editor/settings-sync | |
| //https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions | |
| //https://github.com/microsoft/cascadia-code/blob/master/README.md | |
| //https://github.com/adam7/delugia-code/releases | |
| // @installed | |
| // @category:"themes" | |
| // @popular | |
| //SYNC SETTINGS |