Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Set-Private {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory, Position = 0)][string]$Name,
- [Parameter(Mandatory, Position = 1)][AllowEmptyCollection()][AllowEmptyString()][AllowNull()] [System.Object]$Value
- )
- $MyInvocation.MyCommand.Module.PrivateData[$Name] = $Value
- }
- function Get-Private {
- [CmdletBinding()]
- param (
- [Parameter(Mandatory, Position = 0)] [string]$Name
- )
- Write-Output $MyInvocation.MyCommand.Module.PrivateData[$Name] -NoEnumerate
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement