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 namespace System.Management.Automation | |
function Set-StandardMember { | |
[CmdletBinding()] | |
param( | |
[parameter(Mandatory, ValueFromPipeline)] | |
[object] $InputObject, | |
[parameter(Mandatory)] | |
[string[]] $DefaultProperties |
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-Module "$PSScriptRoot\..\Module\WindowsPresentationFramework" -Force | |
. "$PSScriptRoot\WindowsPresentationFramework.ps1" | |
#Region ThreadSafe | |
# Bind Variables | |
[WindowsPresentationFrameworkThreadSafe()] | |
[PSObject] $Variable = "Herro World from Proxy Scope" | |
[WindowsPresentationFrameworkThreadSafe()] | |
$Sync = [hashtable]::Synchronized(@{}) |
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
# | |
# Originally from: "http://sbrickey.com/Tech/Blog/Post/Parsing_IIS_Logs_with_PowerShell" | |
# | |
# Define the location of log files and a temporary file | |
$LogFolder = "C:\inetpub\logs\LogFiles\W3SVC123" | |
$LogFiles = [System.IO.Directory]::GetFiles($LogFolder, "*.log") | |
$LogTemp = "C:\inetpub\logs\LogFiles\W3SVC123\AllLogs.tmp" | |
# Logs will store each line of the log files in an array |
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 Export-AzKeyVaultCertificate { | |
[CmdletBinding()] | |
param ( | |
[parameter(Mandatory)] | |
[string] | |
$VaultName, | |
[Parameter(Mandatory)] | |
[string] | |
$CertName, |
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
<# | |
System.IdentityModel.Tokens.Jwt with PowerShell to create JWT using RS256. | |
http://blog.d-apps.com/2013/08/powershell-and-json-web-token-handler.html | |
Tested using: | |
Windows 10.0.18362.628 | |
PowerShell 7.0.0 | |
Windows PowerShell 5.1.18362.628 | |
NuGet 5.4.0.6315 | |
System.IdentityModel.Tokens.Jwt 5.6.0 |
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
# Copyright: (c) 2020, Jordan Borean (@jborean93) <[email protected]> | |
# MIT License (see LICENSE or https://opensource.org/licenses/MIT) | |
#Requires -Module MSAL.PS | |
Function New-EXOPSSession { | |
<# | |
.SYNOPSIS | |
Will open a PSSession to Exchange Online. |