David Wilson - @daviwil Software Engineer, PowerShell Team
- Visual Studio Code overview
- Configuring the editor
- Extensions
update wp_options set option_value='http://example.com' where option_name = 'siteurl' or option_name = 'home' | |
update wp_blogs set domain='example.com' where blog_id = '1' or blog_id = '2' | |
update wp_2_options set option_value='http://example.com/second-blog-path' where option_name='siteurl' or option_name='home' | |
update wp_site set domain='example.com' where id='1' | |
update wp_sitemeta set meta_value='http://example.com' where meta_key='siteurl' |
# Create an array of computers to do work against | |
$Computers = “computer01”,”computer02”,”computer03”,”computer04”,”computer05” | |
# Create an empty array that we'll use later | |
$RunspaceCollection = @() | |
# This is the array we want to ultimately add our information to | |
$qwinstaResults = [System.Collections.ArrayList]::Synchronized((New-Object System.Collections.ArrayList)) | |
# Create a Runspace Pool with a minimum and maximum number of run spaces. (http://msdn.microsoft.com/en-us/library/windows/desktop/dd324626(v=vs.85).aspx) |
<# | |
.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. |
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. |
function Get-User { | |
1..100 | ForEach-Object { | |
[PSCustomObject]@{ | |
UserName = "User$_" | |
First = "Bill" | |
Last = $_ | |
Avatar = (Get-ChildItem "$Repository\Avatars" | Get-Random).Name | |
} | |
} | |
} |
# 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 |
# Create an array of computers to do work against | |
$Computers = “computer01”,”computer02”,”computer03”,”computer04”,”computer05” | |
# Create an empty array that we'll use later | |
$RunspaceCollection = @() | |
# This is the array we want to ultimately add our information to | |
[Collections.Arraylist]$qwinstaResults = @() | |
# Create a Runspace Pool with a minimum and maximum number of run spaces. (http://msdn.microsoft.com/en-us/library/windows/desktop/dd324626(v=vs.85).aspx) |
# Convert-ADName.ps1 | |
# Written by Bill Stewart (bstewart@iname.com) | |
# PowerShell wrapper script for the NameTranslate COM object. | |
#requires -version 2 | |
<# | |
.SYNOPSIS | |
Translates Active Directory names between various formats. |