David Wilson - @daviwil Software Engineer, PowerShell Team
- Visual Studio Code overview
- Configuring the editor
- Extensions
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine | |
$global:originalPrompt = $function:global:Prompt | |
$function:global:PSConsoleHostReadLine = { | |
$startProgressIndicator = "`e]9;4;3;50`e\" | |
$command = $originalPSConsoleHostReadLine.Invoke() | |
$startProgressIndicator | Write-Host -NoNewLine | |
$command | |
} |
# Charger les bibliothèques requises | |
Install-Module Microsoft.Graph.Teams -Force | |
Install-Module Microsoft.Graph.SharePoint -Force | |
# Définir les informations d'identification de l'application | |
$clientId = "<Application ID>" | |
$clientSecret = "<Application Secret>" | |
$tenantId = "<Tenant ID>" | |
# Obtenir un jeton d'accès |
<# | |
.SYNOPSIS | |
Scans an Active Directory domain's and its principal's kerberos encryption configuration. | |
.DESCRIPTION | |
Scans an Active Directory domain's and its principal's kerberos encryption configuration. | |
It will generate all data via LDAP, and analyze the results for possible authentication issues. | |
It supports three ways to report: | |
- Print: Write analysis of results to screen |
function Get-User { | |
1..100 | ForEach-Object { | |
[PSCustomObject]@{ | |
UserName = "User$_" | |
First = "Bill" | |
Last = $_ | |
Avatar = (Get-ChildItem "$Repository\Avatars" | Get-Random).Name | |
} | |
} | |
} |
# Convert-ADName.ps1 | |
# Written by Bill Stewart ([email protected]) | |
# PowerShell wrapper script for the NameTranslate COM object. | |
#requires -version 2 | |
<# | |
.SYNOPSIS | |
Translates Active Directory names between various formats. |
-- Joins chrome_extension and users table, looks for Mega chrome identifier and specific version number; should also consider running without the version number, to find all users with Mega extension installed and then get it removed prior to it updating. | |
SELECT users.username,chrome_extensions.name,chrome_extensions.version,chrome_extensions.path FROM chrome_extensions JOIN users ON users.uid = chrome_extensions.uid where chrome_extensions.identifier = 'bigefpfhnfcobdlfbedofhhaibnlghod' and chrome_extensions.version = '3.39.4'; |
:: Windows 10 Hardening Script | |
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering. | |
:: Obligatory 'views are my own'. :) | |
:: Thank you @jaredhaight for the Win Firewall config recommendations! | |
:: Thank you @ricardojba for the DLL Safe Order Search reg key! | |
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings! | |
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater | |
: |
David Wilson - @daviwil Software Engineer, PowerShell Team
#requires -version 4.0 | |
Function Test-UporDown { | |
<# | |
.Synopsis | |
Test if a web site is down or if it is just you. | |
.Description | |
The function uses the web site DownForEveryoneOrJustme.com to test is a web site or domain is up or down, or if the problem is just you. The command will write a custom object to the pipeline. See examples. |
<# | |
.SYNOPSIS | |
Sets the system fields for a specific list/library item. | |
.DESCRIPTION | |
This will set the system fields (created, created by, modified, modified by) | |
for a specific list/library item. | |
Provide any or all of those system fields as a parameter and they will be set. | |
If no modified date is provided, the item keeps its current modified date. |