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
<# | |
.SYNOPSIS | |
Export Azure Service Tag IP prefixes to multiple formats | |
.DESCRIPTION | |
PowerShell function to export Azure Service Tag IP prefixes using the Azure REST API. | |
Supports CSV, JSON, and PSObject outputs with flexible filtering options. | |
.AUTHOR | |
Generated with GitHub Copilot |
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
# Define the Event IDs to retrieve | |
$eventIDs = @(4672, 4673, 4674, 4720, 4722, 4726, 4732, 4733, 4756, 4757, 4767, 4624, 4625, 5136) | |
# Define the time range for the query | |
$startTime = (Get-Date).AddDays(-30) # Change to the desired number of days back | |
$endTime = Get-Date | |
# Define the domain controller to query (use localhost if running on the domain controller) | |
$domainController = "YourDomainControllerName" # Replace with your domain controller name |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; | |
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Receiver.sol"; | |
/** | |
* @dev A token holder contract that allows a beneficiary to extract the | |
* @author https://github.com/blueflightx7 |
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
$ghuname = '' #github username PAT created under | |
$pat = '' #Github PAT with Correct Permission Level (ORG/Per Repo) | |
$org = '' #Github Org Name | |
$ghaccesspat = $ghuname + ':' + $pat | |
#base64 encode Github Login PAT | |
$ghtokenencoded = [Convert]::ToBase64String([char[]]$ghaccesspat) | |
#Create REST Header for Powershell | |
$headers = @{ Authorization = 'Basic {0}' -f $ghtokenencoded } |
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
$st = New-Object -TypeName Microsoft.Online.Administration.StrongAuthenticationRequirement | |
$st.RelyingParty = "*" | |
$st.State = “Disabled” | |
$sta = @($st) | |
$Sta = @() | |
Set-MsolUser -UserPrincipalName user@contoso.com -StrongAuthenticationRequirements $sta | |
$result= (Get-MsolUser -MaxResults 2000 |select -ExpandProperty StrongAuthenticationRequirements).state |
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[]]$Computername = "chi-test02" | |
) | |
[DscLocalConfigurationManager()] | |
Configuration ResetLCM { |
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
$numusers= '100' | |
for ($i=1; $i -le $numusers; $i++) | |
{ | |
$randomnum=get-random | |
$PasswordProfile = New-Object -TypeName Microsoft.Open.AzureAD.Model.PasswordProfile | |
$PasswordProfile.Password = "uP@su" + $randomnum | |