This file contains 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-EncryptionKey() | |
{ | |
<# | |
.SYNOPSIS | |
Retrieves a 128/192/256-bit encryption key using the given keyphrase. | |
.PARAMETER KeyPhrase | |
Specifies the phrase to use to create the 128-bit key. | |
.PARAMETER Length |
This file contains 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 Import-PSCredential | |
{ | |
<# | |
.SYNOPSIS | |
Imports a credential exported by Export-PSCredential and returns a Credential. | |
.PARAMETER Path | |
Specifies one or more files to convert from XML files to credentials. | |
.PARAMETER RegistryPath |
This file contains 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-PSCredential | |
{ | |
<# | |
.SYNOPSIS | |
Exports a credential object into an XML file or registry value with an encrypted password. An important note is that the encrypted password can ONLY be read by the user who created the exported file | |
unless a passphrase is provided. | |
.PARAMETER Credential | |
Specifies the Credential to export to a file. Use Get-Credential to supply this. | |
This file contains 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 Invoke-WindowsActivation() | |
{ | |
<# | |
.SYNOPSIS | |
This function reaches out remotely to the specified VAMT server and activates the given machines by proxy. To run this, you must meet the following requirements: | |
* The ActiveDirectory module from Microsoft be installed on the machine this function runs from. Install with: | |
Add-WindowsFeature | |
* It's assumed the machines you are dealing with are on an Active Directory domain. |
This file contains 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-AdReplicationStatus() | |
{ | |
<# | |
.SYNOPSIS | |
This function returns the status of AD replication. | |
.PARAMETER AdServer | |
Specifies the name of the AD Server to query the status of. The default is the local machine. | |
.PARAMETER SiteName |
This file contains 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 Invoke-AdReplicationSync() | |
{ | |
<# | |
.SYNOPSIS | |
Invokes an immediate AD Replication. | |
.PARAMETER AdServer | |
Specifies the AD server to replicate to. This server pulls AD data from all of its partners. | |
.PARAMETER Partition |
This file contains 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-SslCertificateValidation | |
{ | |
<# | |
.SYNOPSIS | |
This function enables or disables SSL Cert validation in your PowerShell session. Calling this affects SSL validation for ALL function calls in the session! | |
.PARAMETER Disable | |
If specified, validation is disabled. If not specified (the default) validation is re-enabled. | |
.EXAMPLE |
This file contains 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
{ | |
"parameters": [ | |
{ | |
"value": { | |
"properties": { | |
"property": [ | |
{ | |
"key": "p1", | |
"value": { | |
"number": { |
This file contains 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 Add-BoshVCenterAccount() | |
{ | |
<# | |
.SYNOPSIS | |
Grants the correct vSphere permissions to the specified service user/group for BOSH director to function. | |
.DESCRIPTION | |
This function creates a new vSphere role called PKS Administrators if it does not exist already. It then assigns the specified local or domain user/group to the role at the root vCenter server object. | |
.PARAMETER Group |
This file contains 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-VCenterAnnotations() | |
{ | |
<# | |
.SYNOPSIS | |
This function copes all custom attributes and annotations from the VMs on one VCenter server to another. | |
.PARAMETER SourceVCenter | |
Specifies the source vCenter server. | |
.PARAMETER DestinationVCenter |
OlderNewer