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 | |
| Trusts the CA certificates for the specified VCenter server. | |
| .DESCRIPTION | |
| Downloads the certificates for the trusted root CA for vcenter.domain.tld | |
| then installs them into the Local Machine's trusted store. | |
| .PARAMETER Server | |
| Mandatory string containing the fully-qualified domain name (FQDN) for the | |
| VCenter for which the CA certificates should be trusted. | |
| .INPUTS |
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
| # lol - https://bsky.app/profile/dbakevlar.bsky.social/post/3mjidu6x4ek2c | |
| function Right-Hose { | |
| [CmdletBinding()] | |
| param () | |
| #region ascii art | |
| $ascii = @' | |
| ::::. | |
| .::::::: |
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
| # You can add the below to your PowerShell profile to add a timestampe to your PowerShell prompt. | |
| # There are tons of ways to go about doing this; this is just one way. | |
| # You also don't need to join an array of strings, you could just do "string" + " string" + " string" etc. | |
| # I just prefer this way. | |
| function prompt { | |
| @( | |
| "$(Get-Date -Format 'yyyy-MM-dd hh:mm:ss')", | |
| "PS", | |
| "$($pwd.Path)", |
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 | |
| Creates necessary componenets for an EntraID Enterprise Application with SAML SSO. | |
| .DESCRIPTION | |
| Creates an Application Registration, Enterprise Application, and two Security Groups | |
| in Microsoft EntraID based on provided parameters and associates them as necessary. | |
| .PARAMETER Name | |
| The name of the enterprise application. This is used to formulate the groups names | |
| as well. | |
| .PARAMETER IdentifierUri |
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 | |
| Represents public web identity information of the current machine. | |
| .DESCRIPTION | |
| The WebIdentityInfo class represents the public web identity information of the | |
| current computer as seen from the ifconfig.me service. | |
| It includes properties such as IP address, user agent, TCP port, HTTP method, encoding, | |
| via, and forwarded headers. |
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 Get-MgCommonGroups { | |
| <# | |
| .SYNOPSIS | |
| Identifies groups of which all the provided users are members (intersections). | |
| .DESCRIPTION | |
| This function consumes an array of Entra ID user identities via ObjectId or UserPrincipalName and checks for | |
| intersections in group membership (groups where all of the provided users are members), and returns a list of | |
| those groups. |
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 Copy-EntraGroupMember { | |
| <# | |
| .SYNOPSIS | |
| Copies members from the source Entra groups to the destination Entra group. | |
| .DESCRIPTION | |
| Copies all members from the specified source Entra groups to the specified destination Entra group. | |
| .PARAMETER SourceGroupId | |
| A GUID reflecting the Id or objectId of the source group from which members should be copied. | |
| .PARAMETER DestinationGroupId | |
| A GUID reflecting the Id or objectId of the destination group to which members should be copied. |
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 New-RandomPassword { | |
| <# | |
| .SYNOPSIS | |
| Generates a random password. | |
| .DESCRIPTION | |
| This function uses the RNGCryptoServiceProvider to genereate a random password of the | |
| provided length. | |
| .PARAMETER Length | |
| How many characters long the random password should be. | |
| .PARAMETER AsPlainText |
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-PasswordEntropy { | |
| <# | |
| .SYNOPSIS | |
| Evaluates the entropy and strength of a password. | |
| .DESCRIPTION | |
| Accepts a secure string, plain string, PSCredential, or SecretManagement secret object | |
| from the pipeline or parameter and evaluates password entropy. | |
| .PARAMETER InputObject | |
| The object to evaluate, as a secure string, plain string, PSCredential, or SecretManagement | |
| .INPUTS |
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 Set-LocationByFragment { | |
| <# | |
| .SYNOPSIS | |
| Sets the present working directory to the first path that matches the given fragment. | |
| .DESCRIPTION | |
| This function identifies all parent directory paths of the present working directory and searches for a | |
| valid path that ends in the given fragment. If a match is found, the present working directory is set to | |
| that path. |
NewerOlder