full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/IsilonPlatform/8.0.6/Functions/IsilonPlatformAddOn.ps1 | IsilonPlatformAddOn.ps1 | # The MIT License
#
# Copyright (c) 2016 Christopher Banck.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... |
PowerShellCorpus/PowerShellGallery/IsilonPlatform/8.0.6/Functions/IsilonPlatformRemove.ps1 | IsilonPlatformRemove.ps1 | # The MIT License
#
# Copyright (c) 2016 Christopher Banck.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... |
PowerShellCorpus/PowerShellGallery/IsilonPlatform/8.0.6/Functions/IsilonPlatformGet.ps1 | IsilonPlatformGet.ps1 | # The MIT License
#
# Copyright (c) 2016 Christopher Banck.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... |
PowerShellCorpus/PowerShellGallery/IsilonPlatform/8.0.6/Functions/IsilonPlatformSet.ps1 | IsilonPlatformSet.ps1 | # The MIT License
#
# Copyright (c) 2016 Christopher Banck.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, cop... |
PowerShellCorpus/PowerShellGallery/Polution/0.9.1/SolutionProject.ps1 | SolutionProject.ps1 |
Class SolutionProject {
[String] $ProjectName
[String] $ProjectLocation
SolutionProject([String] $projectName, [String] $projectLocation){
$this.ProjectName = $projectName
$this.ProjectLocation = $projectLocation
}
} |
PowerShellCorpus/PowerShellGallery/Polution/0.9.1/ProjectInfo.ps1 | ProjectInfo.ps1 | Enum Language {
Unknown
VisualBasic
Csharp
}
Class ProjectInfo {
[String] $Path
[String] $Name
[Language] $Language
[String[]] $Content
[String[]] $None
[String[]] $Compile
[String[]] $ProjectReference
[String[]] $Reference
[String[]] $PublishProfile... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Private/Get-VesterTest.ps1 | Get-VesterTest.ps1 | # Private function to collect *.Vester.ps1 files in the target directory
# Exports a list of each test's FullName (Get-Item / Get-ChildItem property)
function Get-VesterTest {
[CmdletBinding()]
param (
[Parameter(ValueFromPipeline = $true)]
[object[]]$Test
)
# Construct empty... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Private/Read-HostColor.ps1 | Read-HostColor.ps1 | # Used in New-VesterConfig to better highlight user prompts
function Read-HostColor ($Text) {
Write-Host $Text -ForegroundColor Yellow -NoNewline
Write-Output (Read-Host ' ')
}
|
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Private/Set-VesterConfigValue.ps1 | Set-VesterConfigValue.ps1 | # Used by New-VesterConfig to help populate values into a hashtable
function Set-VesterConfigValue {
[CmdletBinding()]
param ($Value)
# Using parent scope variables $config, $Matches, $Vest
If ($config.($Matches[1]).Keys -contains $Matches[2]) {
Write-Verbose "config.$($Matches[1]).$... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Private/Select-InventoryObject.ps1 | Select-InventoryObject.ps1 | # Called by New-VesterConfig
# Helps the user interactively select which inventory object (Cluster, Host, VM, etc.)
# to pull initial config file values from
function Select-InventoryObject {
[CmdletBinding()]
param (
$ObjectList,
[string]$Scope
)
Write-Host "`n Listing ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Private/Template/VesterTemplate.Tests.ps1 | VesterTemplate.Tests.ps1 | <#
This file exists to combine simple user input (Invoke-Vester), simple
user test authoring (*.Vester.ps1), and properly scoped inventory objects
into a single test session that loops through all necessary combinations.
It is called by Invoke-Vester via the Invoke-Pester command.
http://vester.readthedocs.io/... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Public/New-VesterConfig.ps1 | New-VesterConfig.ps1 | #Requires -Modules VMware.VimAutomation.Core
function New-VesterConfig {
<#
.SYNOPSIS
Generates a Vester config file from settings in your existing VMware environment.
.DESCRIPTION
New-VesterConfig is designed to be a quick way to get started with Vester.
Vester needs one config fil... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Public/Invoke-Vester.ps1 | Invoke-Vester.ps1 | #Requires -Version 3 -Modules Pester, VMware.VimAutomation.Core
function Invoke-Vester {
<#
.SYNOPSIS
Test and fix configuration drift in your VMware vSphere environment.
.DESCRIPTION
Invoke-Vester will run each test it finds and report on discrepancies.
It compares actual values agai... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/NTP-Servers.Vester.ps1 | NTP-Servers.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'NTP Servers'
# Test description: How New-VesterConfig explains this value to the user
$Description = "Server(s) to use for synchronizing the h... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/DCUI-Timeout.Vester.ps1 | DCUI-Timeout.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DCUI Timeout'
# Test description: How New-VesterConfig explains this value to the user
$Description = '0 (off) number of seconds before the DC... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/TPS-ForceSalting.Vester.ps1 | TPS-ForceSalting.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - ESXi.TransparentPageSharing-intra-enabled
# Test title, e.g. 'DNS Servers'
$Title = 'Transparent Page Share Force Salting'
# Test descriptio... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/DNS-Address.Vester.ps1 | DNS-Address.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DNS Servers'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'DNS address(es) for the host to query ag... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/SSH-Service.Vester.ps1 | SSH-Service.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'SSH Service State'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'On/off switch for allowing SSH con... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/Password-Policy.Vester.ps1 | Password-Policy.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - ESXi.set-password-policies
# Test title, e.g. 'DNS Servers'
$Title = 'Password Policy'
# Test description: How New-VesterConfig explains thi... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/Syslog-Firewall.Vester.ps1 | Syslog-Firewall.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Syslog Firewall'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'On/off switch to set a Syslog except... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/DNS-SearchDomain.Vester.ps1 | DNS-SearchDomain.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DNS Search Domains'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Domain(s) to append to DNS querie... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/Account-UnlockTime.Vester.ps1 | Account-UnlockTime.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Account Unlock Time'
# Test description: How New-VesterConfig explains this value to the user
$Description = '0 (off) or number of seconds tha... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/SSH-InteractiveTimeout.Vester.ps1 | SSH-InteractiveTimeout.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'SSH Interactive Timeout'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Maximum idle time permitted ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/Account-Lockout.Vester.ps1 | Account-Lockout.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Account Lock Failures'
# Test description: How New-VesterConfig explains this value to the user
$Description = '0 (off) or maximum number of f... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/SSH-Timeout.Vester.ps1 | SSH-Timeout.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'SSH Timeout'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'After being enabled, SSH access disables... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/Syslog-Server.Vester.ps1 | Syslog-Server.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Syslog Server'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Syslog server(s) to send log data to'
... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/VIB-AcceptanceLevel.Vester.ps1 | VIB-AcceptanceLevel.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - ESXi.verify-acceptance-level-accepted
# Test title, e.g. 'DNS Servers'
$Title = 'Image Profile and VIB Acceptance Level'
# Test description:... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/DCUI-Access.Vester.ps1 | DCUI-Access.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DCUI Access'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Comma separated list of users with DCUI ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Host/SSH-Warning.Vester.ps1 | SSH-Warning.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'SSH Warning'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'On/off switch for the vSphere warning wh... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-GetCreds-Disable.Vester.ps1 | VMX-GetCreds-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-getcreds
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-BIOSbbs-Disable.Vester.ps1 | VMX-BIOSbbs-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-biosbbs
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling t... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Active-Disable.Vester.ps1 | VMX-Unity-Active-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unity-active
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabl... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-PasteDisable.Vester.ps1 | Tools-PasteDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-console-paste
# Test title, e.g. 'DNS Servers'
$Title = 'Tools Paste Disable'
# Test description: How New-VesterConfig explains t... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-DndDisable.Vester.ps1 | Tools-DndDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-console-drag-n-drop
# Test title, e.g. 'DNS Servers'
$Title = 'Tools Drag and Drop Disable'
# Test description: How New-VesterCon... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-HGFS-ServerDisable.Vester.ps1 | Tools-HGFS-ServerDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-hgfs
# Test title, e.g. 'DNS Servers'
$Title = 'Tools HGFS Server Disable'
# Test description: How New-VesterConfig explains this... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Window-Disable.Vester.ps1 | VMX-Unity-Window-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unity-windowcontents
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitl... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-CopyDisable.Vester.ps1 | Tools-CopyDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-console-copy
# Test title, e.g. 'DNS Servers'
$Title = 'Tools Copy Disable'
# Test description: How New-VesterConfig explains thi... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-MemSfss-Disable.Vester.ps1 | VMX-MemSfss-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-memsfss
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling t... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-ProtocolHandler-Disable.Vester.ps1 | VMX-ProtocolHandler-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-protocolhandler
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly dis... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-GuiOptions.Vester.ps1 | Tools-GuiOptions.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-console-gui-options
# Test title, e.g. 'DNS Servers'
$Title = 'Tools GUI Options'
# Test description: How New-VesterConfig explai... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-VersionGet-Disable.Vester.ps1 | VMX-VersionGet-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-versionget
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disablin... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-VersionSet-Disable.Vester.ps1 | VMX-VersionSet-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-versionset
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disablin... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Memory-Limits.Vester.ps1 | Memory-Limits.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'Memory Limits Test'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Optionally disallow VMs from spec... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-ShellAction-Disable.Vester.ps1 | VMX-ShellAction-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-shellaction
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabli... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Autologon-Disable.Vester.ps1 | VMX-Autologon-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-autologon
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Taskbar-Disable.Vester.ps1 | VMX-Unity-Taskbar-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unity-taskbar
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disab... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Disable.Vester.ps1 | VMX-Unity-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unity
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling the... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-TopoRequest-Disable.Vester.ps1 | VMX-TopoRequest-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-toporequest
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabli... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/CDDrive-Host.Vester.ps1 | CDDrive-Host.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'CD-ROM Host Device'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Optionally disallow VMs from usin... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Interlock-Disable.Vester.ps1 | VMX-Unity-Interlock-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unity-interlock
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly dis... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-Unity-Push-Disable.Vester.ps1 | VMX-Unity-Push-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-unitypush
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-DiskWiperDisable.Vester.ps1 | Tools-DiskWiperDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-disk-shrinking-wiper
# Test title, e.g. 'DNS Servers'
$Title = 'Tools Disk Wiper Disable'
# Test description: How New-VesterConfi... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-TrayIcon-Disable.Vester.ps1 | VMX-TrayIcon-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-trayicon
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disabling ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-TrashFolderState-Disable.Vester.ps1 | VMX-TrashFolderState-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-trashfolderstate
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly di... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/VMX-LaunchMenu-Disable.Vester.ps1 | VMX-LaunchMenu-Disable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-unexposed-features-launchmenu
# Unexposed features are items that apply to Workstation or Fusion but not vSphere
# Explicitly disablin... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/Tools-DiskShrinkDisable.Vester.ps1 | Tools-DiskShrinkDisable.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - VM.disable-disk-shrinking-shrink
# Test title, e.g. 'DNS Servers'
$Title = 'Tools Disk Shrink Disable'
# Test description: How New-VesterCon... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/CPU-Limits.Vester.ps1 | CPU-Limits.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'CPU Limits Test'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Optionally disallow VMs from specify... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/VM/CDDrive-ISO.Vester.ps1 | CDDrive-ISO.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'CD-ROM ISO File'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Optionally disallow VMs from mountin... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Cluster/DRS-Mode.Vester.ps1 | DRS-Mode.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DRS Migration Threshold'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Migration Threshold [int](1-... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Cluster/DRS-Enabled.Vester.ps1 | DRS-Enabled.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DRS State'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'On/off switch for Distributed Resource Sch... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Cluster/HA-Enabled.Vester.ps1 | HA-Enabled.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'HA State'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'On/off switch for High Availability on the ... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Cluster/DRS-Level.Vester.ps1 | DRS-Level.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'DRS Automation Level'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Automation Level for Distribute... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/Network/VDS-Discovery.Vester.ps1 | VDS-Discovery.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'VDS Link Protocol'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'Set the discovery mode for downstr... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/vCenter/SMTP-Port.Vester.ps1 | SMTP-Port.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# Test title, e.g. 'DNS Servers'
$Title = 'SMTP Port'
# Test description: How New-VesterConfig explains this value to the user
$Description = 'The port vCenter should use when sending e... |
PowerShellCorpus/PowerShellGallery/Vester/1.0.1/Tests/vCenter/NFC-UseSSL.Vester.ps1 | NFC-UseSSL.Vester.ps1 | # Test file for the Vester module - https://github.com/WahlNetwork/Vester
# Called via Invoke-Pester VesterTemplate.Tests.ps1
# vSphere 6.0 Hardening Guide Guideline ID - vCenter.verify-nfc-ssl
# Test title, e.g. 'DNS Servers'
$Title = 'Network File Copy - Use SSL'
# Test description: How New-VesterConfig expl... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Ast.ps1 | Ast.ps1 | function ConvertTo-Ast
{
[CmdletBinding()]
param([String]$String)
Write-Debug $String
$Tokens = $null
$Errors = $null
[System.Management.Automation.Language.Parser]::ParseInput($String, [ref]$Tokens, [ref]$Errors)
$Errors | % { Write-Error $_ }
}
function Get-Parameter
{
[CmdletBinding()]
param(
[Param... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/ListUsers.ps1 | ListUsers.ps1 |
function Get-LogonSession
{
[CmdletBinding()]
param(
[Parameter(ValueFromPipeline=$true)]
[String[]]$ComputerName = 'localhost')
Process {
$server = [PoshInternals.Wtsapi32]::WTSOpenServer($ComputerName )
if ($server -eq [IntPtr]::Zero)
{
throw new-Object System.ComponentModel.Win32Exception
... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Interop.ps1 | Interop.ps1 | function ConvertTo-Object {
[CmdletBinding()]
param(
[Parameter()]
[IntPtr]$Ptr,
[Parameter()]
[Type]$Type
)
Process {
[System.Runtime.InteropServices.Marshal]::PtrToStructure($Ptr, [Type]$Type)
}
}
function ConvertTo-Pointer {
[CmdletBinding()]
param(
[Parameter()]
$Object
)
Process {
$Si... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/PendMoves.ps1 | PendMoves.ps1 | <#
.Synopsis
Gets the pending file rename operations that will take place on the next restart.
.DESCRIPTION
Gets the pending file rename operations that will take place on the next restart. Move-FileOnReboot and Remove-FileOnReboot
can schedule these rename operations.
.EXAMPLE
Get-PendingFileRename... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/FileSystemCache.ps1 | FileSystemCache.ps1 | <#
.Synopsis
Gets the current Windows Cache Manager file system cache sizes and flags.
.DESCRIPTION
Gets the current Windows Cache Manager file system cache sizes and flags.
This cmdlet returns the maximum, minimum and flags used to specify the limits for the
system's file system cache.
.EXAMPLE... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/ActivationContext.ps1 | ActivationContext.ps1 | $Script:ActivationContexts = @()
<#
.Synopsis
Creates a Windows Activation Context.
.DESCRIPTION
Creates a Windows Activation Context. This cmdlet can optionally open
the activation context.
.EXAMPLE
Create-ActivationContext -Manifest E:\IE.EXE.Manifest
.EXAMPLE
Create-ActivationContext -Ope... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Handle.ps1 | Handle.ps1 | <#
.Synopsis
Gets open system handles.
.DESCRIPTION
Gets open system handles. This cmdlet can filter by process and handle name.
.EXAMPLE
Get-Process Notepad | Get-Handle
.EXAMPLE
Get-Handle -Name "*myfile.txt"
#>
function Get-Handle
{
[CmdletBinding()]
param(
# A process to retu... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/ListDlls.ps1 | ListDlls.ps1 | <#
.Synopsis
Gets the DLLs loaded by processes on the system.
.DESCRIPTION
Gets the DLLs loaded by processes on the system.
.EXAMPLE
Get-Dll -ProcessName Notepad
.EXAMPLE
Get-Dll -ModuleName mydll.dll
#>
function Get-Dll
{
[CmdletBinding()]
param(
# The process to get the DLLs of ... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Pinvoke.ps1 | Pinvoke.ps1 | $ScriptDirectory = Split-Path $MyInvocation.MyCommand.Path -Parent
Add-Type -Path (Join-Path $ScriptDirectory "PInvoke.cs")
|
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Privilege.ps1 | Privilege.ps1 | <#
.Synopsis
Enables or disables a privilege for the current process token.
.DESCRIPTION
Enables or disables a privilege for the current process token.
.EXAMPLE
Set-Privilege -Privilege SeDebugPrivilege
.EXAMPLE
Set-Privilege -Privilege SeAuditPrivilege -Disable
#>
function Set-Privilege
{
... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/MemoryMappedFile.ps1 | MemoryMappedFile.ps1 | function New-MemoryMappedFile
{
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[String]$Name,
[Parameter()]
[Int64]$Size)
[System.IO.MemoryMappedFiles.MemoryMappedFile]::CreateNew($Name, $Size);
}
function Open-MemoryMappedFile
{
param([String]$Name)
[System.IO.MemoryMappedFiles.MemoryMappedFile]::OpenExi... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/NamedPipes.ps1 | NamedPipes.ps1 | <#
.Synopsis
Sends a message of a named pipe.
.DESCRIPTION
Sends a message of a named pipe.This named pipe can exist locally or on a remote machine. By default,
this cmdlet sends the message using Unicode encoding.
.EXAMPLE
Send-NamedPipeMessage -PipeName "DrainPipe" -ComputerName "domaincontroller" -Mes... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/ScreenSaver.ps1 | ScreenSaver.ps1 | [Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.WIndows.Forms.Application]::EnableVisualStyles()
[System.WIndows.Forms.Application]::SetCompatibleTextRenderingDefault($false)
function Show-ScreenSaver
{
$screen = [System.Windows.Forms.Screen]::PrimaryScreen
$screenSave... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Get-ComputerSID.ps1 | Get-ComputerSID.ps1 | <#
.Synopsis
Gets the SID of the computer.
.DESCRIPTION
Gets the SID of the computer.
.EXAMPLE
Get-ComputerSID
#>
function Get-ComputerSID
{
((get-wmiobject -query "Select *from Win32_UserAccount Where LocalAccount =TRUE").SID -replace "\d+$","" -replace ".$")[0]
}
|
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Mutex.ps1 | Mutex.ps1 | $Global:Mutex = $null
function New-Mutex
{
param([String]$Name, [Bool]$InitialOwner)
$wasCreated = $false
New-Object System.Threading.Mutex($InitialOwner, $Name, [ref]$wasCreated)
}
function Open-Mutex
{
param([String]$Name)
New-Object System.Threading.Mutex($false, $Name, [ref]$wasCreated)
}
function Enter-M... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/PipeList.ps1 | PipeList.ps1 | <#
.Synopsis
Gets the open pipes on the local system.
.DESCRIPTION
Gets the open pipes on the local system.
.EXAMPLE
Get-PipeList
#>
function Get-PipeList
{
End {
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
}
}
|
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/BlueScreen.ps1 | BlueScreen.ps1 | <#
.Synopsis
Installs a blue screen screensaver that mimics the Windows 8 system fault blue screen.
.DESCRIPTION
Installs a blue screen screensaver that mimics the Windows 8 system fault blue screen. This cmdlet
compiles a custom C# PowerShell SCR file to the system directory that can be used to host an... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Hooks.ps1 | Hooks.ps1 | $Script:ActiveHooks = New-Object -TypeName System.Collections.ArrayList
function Set-Hook {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[String]$Dll,
[Parameter(Mandatory)]
[String]$EntryPoint,
[Parameter(Mandatory)]
[Type]$ReturnType,
[Parameter(Mandatory)]
[ScriptBlock]$ScriptBlock,
[Parameter()]
[in... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Desktops.ps1 | Desktops.ps1 | <#
.Synopsis
Returns the desktops for this Windows Station.
.DESCRIPTION
Returns the desktops for this Windows Station.
.EXAMPLE
Get-Desktop
.EXAMPLE
Get-Desktop -Name Default
#>
function Get-Desktop
{
param(
# The name of the desktop to return
[Parameter(Position=0)]
[String]$Name = "*"
... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Procdump.ps1 | Procdump.ps1 | <#
.Synopsis
Writes a minidump for the specified process.
.DESCRIPTION
Writes a minidump for the specified process. When no path is specified the dump will be placed
in the current directory with the name of the process and a time stamp.
.EXAMPLE
Get-Process Notepad | Out-MiniDump -Path C:\MyDump.... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/PoshExec.ps1 | PoshExec.ps1 | function Start-RemoteProcess
{
[CmdletBinding()]
param(
[Parameter()]
$ComputerName,
[Parameter(Mandatory)]
[System.Management.Automation.Credential()]
$Credential=[System.Management.Automation.PSCredential]::Empty,
[Parameter()]
$FilePath,
[Parameter()]
[Switch]$Interact,
[Par... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Suspend.ps1 | Suspend.ps1 | function Suspend-Process
{
[CmdletBinding()]
param(
[Parameter(ValueFromPipeline=$true)]
[System.Diagnostics.Process]$Process)
Process {
$Process.Threads | ForEach-Object {
$pOpenThread = [PoshInternals.Kernel32]::OpenThread([PoshInternals.ThreadAccess]::SUSPEND_RESUME, $false, [System.UInt32]$_.Id);
if ... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Set-WorkingSetToMin.ps1 | Set-WorkingSetToMin.ps1 | # Dont run Set-WorkingSet on sqlservr.exe, store.exe and similar processes
# Todo: Check process name and filter
# Example - get-process notepad | Set-WorkingSetToMin
Function Set-WorkingSetToMin {
[CmdletBinding()]
param(
[Parameter(ValueFromPipeline=$True, Mandatory=$true)]
[System.Diagnostics.Proces... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/MoveFile.ps1 | MoveFile.ps1 | <#
.Synopsis
Schedules a file to be moved on reboot.
.DESCRIPTION
Schedules a file to be moved on reboot. This cmdlet can move a file on reboot and optionally
replace an existing file.
.EXAMPLE
Move-FileOnReboot -Path "C:\Windows\System32\kernel32.dll" -Destination "C:\Windows\SysWow64\kernel32.... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/ProcessLogger.ps1 | ProcessLogger.ps1 | #Sunny Chakraborty (@sunnyc7)(sunnyc7@gmail.com)
#License: MIT-3 > Use as you please + Don't Sue Me.
#FileMon tricks
Function Get-ProcessLaunches([string[]]$computer) {
BEGIN {
Function Write-Log([string]$info){
if($loginitialized -eq $false){
$FileHeader > $logfile
$scrip... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Build/NewManifest.ps1 | NewManifest.ps1 | $FunctionsToExport = @( 'Close-ActivationContext',
'Close-Handle',
'ConvertTo-Ast',
'ConvertTo-Object',
'ConvertTo-Pointer',
'ConvertTo-RegularFileName',
'ConvertTo-String',
'Enter-Mutex',
'Exit-Mutex',
'Get-Ast',
'Get-ComputerSID',
'Get-Desktop',
... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Build/PublishModule.ps1 | PublishModule.ps1 | if ($env:APPVEYOR_REPO_BRANCH -eq 'master'-and $env:APPVEYOR_PULL_REQUEST_NUMBER -eq $null)
{
choco install NuGet.CommandLine
Install-PackageProvider -Name NuGet -Force
Publish-Module -NuGetApiKey $env:ApiKey -Path C:\PoshInternals -Confirm:$False -Verbose
} |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Build/InvokeTests.ps1 | InvokeTests.ps1 | if ($PSVersionTable.PSVersion.Major -ge 5)
{
Write-Verbose -Verbose "Installing PSScriptAnalyzer"
$PSScriptAnalyzerModuleName = "PSScriptAnalyzer"
Install-PackageProvider -Name NuGet -Force
Install-Module -Name $PSScriptAnalyzerModuleName -Scope CurrentUser -Force
$PSScriptAnalyzerModule = get-mod... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/Ast.Tests.ps1 | Ast.Tests.ps1 | Describe "AstTests" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Context "RemoveExtentTest" {
$tokens = $null
$errors = $null
$scriptBlock = ConvertTo-Ast "{ param([ref][int]`$parameter) `$parameter }"
$attribute = Get-Ast -Ast $scriptBlock -TypeConstraint -SearchNestedBlocks
$attribute = $attribu... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/Procdump.Tests.ps1 | Procdump.Tests.ps1 | Describe "Out-MiniDump" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Context "notepad running and a dump is collected" {
$TempPath = [System.IO.Path]::GetTempPath()
$NotepadDmp = Join-Path $TempPath "Notepad.dmp"
$Notepad = Start-Process Notepad -PassThru
$Notepad | Out-MiniDump -Path $NotepadDmp -F... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/Handle.Tests.ps1 | Handle.Tests.ps1 | Describe "Get-Handle" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Context "File is locked" {
$TempFile = [IO.Path]::GetTempFileName()
$File = [IO.File]::Open($TempFile, 'OpenOrCreate', 'Write', 'None')
try
{
$Handle = Get-Handle -Name $TempFile
}
finally
{
$File.Close()
$File.Disp... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/MemoryMappedFile.Tests.ps1 | MemoryMappedFile.Tests.ps1 | Describe "MemoryMappFile" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Context "ReadWriteFromMemoryMappedFile" {
$MemoryMappedFile = New-MemoryMappedFile -Name "TestFile" -Size 1kb
"This is a test" | Out-MemoryMappedFile -MemoryMappedFile $MemoryMappedFile
$OtherMemoryMappedFile = Open-MemoryMappedFile... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/InitializeTest.ps1 | InitializeTest.ps1 | if ($ENV:APPVEYOR -ne 'true')
{
$ENV:APPVEYOR_BUILD_VERSION = '99.99'
. (Join-Path $PSScriptRoot '..\Build\NewManifest.ps1')
}
Import-Module (Join-Path $PSScriptRoot "..\PoshInternals.psd1") -Force -Global -ErrorAction Stop |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/Hooks.Tests.ps1 | Hooks.Tests.ps1 | Describe "HooksTest" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Register-PoshHook
Context "Local hooked beep set to return true" {
It "redirects the call" -Skip {
Set-Hook -Dll "Kernel32.dll" -ReturnType "bool" -EntryPoint "Beep" -ScriptBlock {
param([int]$Freq, [int]$Duration)
return $tr... |
PowerShellCorpus/PowerShellGallery/PoshInternals/1.0.31/Tests/Interop.Tests.ps1 | Interop.Tests.ps1 | Describe "Interop" {
. (Join-Path $PSScriptRoot 'InitializeTest.ps1')
Context "ConvertTo-Object" {
$time = New-Object System.Runtime.InteropServices.ComTypes.FILETIME
$time.dwLowDateTime = 100
$ptr = ConvertTo-Pointer $Time
$time2 = ConvertTo-Object -Ptr $ptr -Type $Time.GetType()
It "should marshal corr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.