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
XML - Localization | |
<Localization Enabled="true"> | |
<SupportedLanguages DefaultLanguage="en" MergeBehavior="Append"> | |
<SupportedLanguage>en</SupportedLanguage> | |
<SupportedLanguage>es</SupportedLanguage> | |
</SupportedLanguages> | |
<LocalizedResources Id="api.localaccountsignup.en"> | |
<LocalizedStrings> | |
<LocalizedString ElementType="GetLocalizedStringsTransformationClaimType" StringId="email_subject">Contoso account email verification code</LocalizedString> |
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
$myuser = get-azaduser | |
$mygroups = get-azadgroup | |
$myReport = New-Object System.Collections.ArrayList($null) | |
$myReport.AddRange($myuser) | |
for($i =0; $i -lt $myuser.length; ++$i){ | |
$fullname = $myuser.Get($i).displayname; | |
$emailaddress = $myuser.get($i).userprincipalname; | |
$azurerole = Get-AzRoleAssignment -ObjectId $myuser.Get($i).id |
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-AzRoleDefinition -name "<Insert-Your-Azure-RBAC-Role>" | ` | |
%{ | |
$a = $_ | |
$_.Actions | select ` | |
@{n="Role";e={$a.Name}}, | |
@{n="Type";e={"Actions"}}, | |
@{n="Definition";e={$_}} | |
$_.DataActions | select ` | |
@{n="Role";e={$a.Name}}, | |
@{n="Type";e={"DataActions"}}, |
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
<select onChange="window.location.href=this.value"> | |
<option>Select Your State </option> | |
<option value="AL">Alabama</option> | |
<option value="AK">Alaska</option> | |
<option value="AZ">Arizona</option> | |
<option value="AR">Arkansas</option> | |
<option value="CA">California</option> | |
<option value="CO">Colorado</option> | |
<option value="CT">Connecticut</option> | |
<option value="DE">Delaware</option> |
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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install php7.2 | |
sudo apt-get install php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-mysql php7.2-mbstring php7.2-mcrypt php7.2-zip php7.2-fpm | |
sudo a2dismod <old-php-version> | |
sudo a2enmod php7.2 | |
sudo service apache2 restart |
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
Connect-AzureAD | |
Import-Module "AzureADPreview" | |
$appID = "...guid-of-the-AppID..." | |
$sp = Get-AzureADServicePrincipal -Filter "servicePrincipalNames/any(n: n eq '$appID')" | |
$existingPolicies = Get-AzureADServicePrincipalPolicy -Id $sp.ObjectId ` | |
| Where-Object { $_.Type -eq "ClaimsMappingPolicy" } | |
$existingPolicies |
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
connect-azuread | |
$appname = "Your-App-Registration-Name" | |
$sp = Get-AzureADServicePrincipal -filter "DisplayName eq '$appname'" | |
$role = Get-AzureADDirectoryRole | |
For ($i=0; $i -lt $role.Count; $i++){ |
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
connect-azuread | |
$SPObjectID = "your-spn-objectid" | |
$role = (Get-AzureADDirectoryRole).objectId | |
For ($i=0; $i -lt $role.Count; $i++){ | |
if(Get-AzureADDirectoryRoleMember -ObjectId $role.Get($i) | where {$_.objectId -eq $SPObjectID}) { | |
$role.DisplayName | |
} | |
} |
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
1. xxx-xxx-xxxx grep -o '[0-9]\{3\}\-[0-9]\{3\}\-[0-9]\{4\}' file.txt | |
2. (xxx)xxx-xxxx grep -o '([0-9]\{3\})[0-9]\{3\}\-[0-9]\{4\}' file.txt | |
3. xxx xxx xxxx grep -o '[0-9]\{3\}\s[0-9]\{3\}\s[0-9]\{4\}' file.txt | |
4. xxxxxxxxxx grep -o '[0-9]\{10\}' file.txt | |
grep -o '\([0-9]\{3\}\-[0-9]\{3\}\-[0-9]\{4\}\)\|\(([0-9]\{3\})[0-9]\{3\}\-[0-9]\{4\}\)\|\([0-9]\{10\}\)\|\([0-9]\{3\}\s[0-9]\{3\}\s[0-9]\{4\}\)' file.txt | |
- Found online, and put on my git for reference. | |
Credit goes to Raullen Chai | |
on |
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 Microsoft.IdentityModel.Clients.ActiveDirectory; | |
using System.Net.Http.Headers; | |
using System.Net.Http; | |
static async Task createRandomUsers() | |
{ | |
httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", result.AccessToken); | |
Console.WriteLine("\n \n Creating users {0}", DateTime.Now.ToString()); | |
for(int index = 0;index < 10; ++index) |
NewerOlder