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
| param ( | |
| [string]$Domain = "xyz.onmicrosoft.com", # Default domain | |
| [string]$NamePrefix = "someprefix", # Default name prefix | |
| [int]$UserCount = 5 # Default number of users to create | |
| ) | |
| # Ensure you are logged in to Azure before running this script | |
| # Connect-AzAccount | |
| # Function to generate a random password |
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
| irm https://aka.ms/portalfx/cli/setup -outfile setup.js && node .\setup.js |
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 dotnet-install.ps1 script | |
| Invoke-WebRequest -Uri https://dot.net/v1/dotnet-install.ps1 -OutFile dotnet-install.ps1 | |
| # Execute the downloaded script with the desired .NET version | |
| .\dotnet-install.ps1 -Version $((Get-Content .\global.json | ConvertFrom-Json).sdk.version) |
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 session_replication_role = 'replica'; | |
| //things | |
| SET session_replication_role = 'origin'; |
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
| CREATE DATABASE | |
| AzureStorageEmulatorDb510 | |
| ON PRIMARY ( | |
| NAME=AzureStorageEmulatorDb510_data, | |
| FILENAME = 'C:\Users\username\AzureStorageEmulatorDb510_data.mdf' | |
| ) | |
| LOG ON ( | |
| NAME=AzureStorageEmulatorDb510_log, | |
| FILENAME = 'C:\Users\username\AzureStorageEmulatorDb510_log.ldf' | |
| ) |
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
| { | |
| "words": [ | |
| "abraham", | |
| "absent", | |
| "absorb", | |
| "absurd", | |
| "academy", | |
| "accent", | |
| "acid", | |
| "acrobat", |
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 this based on your machine config :) | |
| $maxConcurrentJobs = 5 | |
| Select-AzSubscription -Subscription "<Azure_SubscriptionId_Here>" | |
| $rgs = Get-AzResourceGroup | |
| foreach($rg in $rgs) { | |
| $check = $false | |
| while ($check -eq $false) { | |
| if ((Get-Job -State 'Running').Count -lt $maxConcurrentJobs) { | |
| Start-Job -Name $rg.ResourceGroupName -ArgumentList $rg -ScriptBlock { |
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
| import pptx | |
| import time | |
| from pptx import Presentation | |
| from pptx.enum.text import MSO_AUTO_SIZE | |
| def main(): | |
| outputPPTX = Presentation() | |
| outputPPTX.slide_width = 11887200 | |
| outputPPTX.slide_height = 6686550 |
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
| function Test-ServerSSLSupport { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
| [ValidateNotNullOrEmpty()] | |
| [string]$HostName, | |
| [UInt16]$Port = 443 | |
| ) | |
| process { | |
| $RetValue = New-Object psobject -Property @{ |
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
| #!/usr/bin/env python | |
| import sys | |
| try: | |
| from PyPDF2 import PdfFileReader, PdfFileWriter | |
| except ImportError: | |
| from pyPdf import PdfFileReader, PdfFileWriter | |
| def pdf_cat(input_files, output_stream): | |
| input_streams = [] | |
| try: |
NewerOlder