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
| using System; | |
| using System.Text; | |
| using System.Linq; | |
| /*Calculates a LUHN-10. | |
| * 1. Double the value of alternate digits beginning with the rightmost digit | |
| * 2. Add the individual digits comprising the products obtained in step 1 to each of the unaffected digits in the original number. | |
| * 3. Find the next highest multiple of 10 | |
| * 4. The check digit is the value obtained in step 2 subtracted from the value obtained in step 3. | |
| * 5. END |
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
| gwmi win32_operatingSystem | select caption | |
| http://serverfault.com/questions/727163/is-it-possible-to-get-a-windows-version-from-a-powershell-command-on-windows-ser | |
| Dism /Online /Get-Feature | |
| Get-CimInstance Win32_OperatingSystem | Select-Object Caption | ForEach{ $_.Caption } |
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
| ################## | |
| # Privacy Settings | |
| ################## | |
| # Privacy: Let apps use my advertising ID: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
| # To Restore: | |
| #Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
| # Privacy: SmartScreen Filter for Store Apps: Disable | |
| Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 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
| filter Skip-Empty { $_|?{ $_ -ne $null -and $_} } | |
| get-content *-servers.txt | sort -unique | Skip-Empty | .\Collect-ServerInfo\Collect-ServerInfo.ps1 |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |