full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDnsClientGlobalSetting/1-ConfigureSuffixSearchList.ps1 | 1-ConfigureSuffixSearchList.ps1 | <#
.EXAMPLE
Configure only contoso.com for the DNS Suffix
#>
Configuration Example
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost'
)
Import-DscResource -Module xNetworking
Node $NodeName
{
xDnsClientGlobalSetting AddDNS... |
PowerShellCorpus/PowerShellGallery/xNetworking/4.1.0.0/Examples/Resources/xDnsConnectionSuffix/1-AddSpecificSuffix.ps1 | 1-AddSpecificSuffix.ps1 | <#
.EXAMPLE
This configuration will set a DNS connection-specific suffix on a network interface that is identified by its alias.
#>
Configuration Example
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost'
)
Import-DscResource -Module xNetworki... |
PowerShellCorpus/PowerShellGallery/IPv6Regex/1.1.1/PublishPsGalleryModule.ps1 | PublishPsGalleryModule.ps1 | #requires -Modules PowerShellGet
$ReleaseNotes =@'
IPv6Regex
Chris Warwick, @cjwarwickps, October 2015
This PowerShell script tests a number of regular expressions that match text representations of IPv6 addresses.
The script also runs the sample test cases against the [System.Net.IpAddress]::TryParse() met... |
PowerShellCorpus/PowerShellGallery/MicrosoftHealth/1.5/Pester/New-MicrosoftHealth.tests.ps1 | New-MicrosoftHealth.tests.ps1 | <#
Pester provides a framework for running Unit Tests to execute and validate PowerShell commands inside of PowerShell.
More info can be found here:
https://github.com/pester/Pester
To test run the following command:
invoke-pester from ..\Pester\ folder
#>
Remove-Module MicrosoftHealth -Force -ErrorAction... |
PowerShellCorpus/PowerShellGallery/ChefConfSamples/0.9.0/tests/unit/ChefConf_AppPool/pester/ChefConf_AppPool.Tests.ps1 | ChefConf_AppPool.Tests.ps1 | $ModuleName = (Split-Path -leaf $MyInvocation.MyCommand.Path) -replace '\.[Tt][Ee][Ss][Tt][Ss].[Pp][Ss]1'
$TestsFolder = 1..4 |
foreach {$Path = $MyInvocation.MyCommand.Path } {$Path = Split-Path $Path} {$Path}
$RootOfModule = Split-Path $TestsFolder
$CurrentResourceModulePath = Join-Path $RootOfModule "DscRes... |
PowerShellCorpus/PowerShellGallery/AzureRM.Cdn/3.1.0/CdnStartup.ps1 | CdnStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.Cdn/2.8.0/CdnStartup.ps1 | CdnStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.KeyVault/3.1.0/ResourceManagerStartup.ps1 | ResourceManagerStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... |
PowerShellCorpus/PowerShellGallery/AzureRM.KeyVault/2.8.0/ResourceManagerStartup.ps1 | ResourceManagerStartup.ps1 | # ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apach... |
PowerShellCorpus/PowerShellGallery/posh-gist/0.4/posh-gist.ps1 | posh-gist.ps1 | Function Get-CredentialBasic {
<#
.Synopsis
Outputs BASIC credentials.
.INPUTS
PSCredential
.OUTPUTS
string
.NOTES
The accepted credentials is either your Github username/password pair, or, preferably,
your username and a token created at https://github.com/setting... |
PowerShellCorpus/PowerShellGallery/posh-gist/0.4/install.ps1 | install.ps1 | [CmdletBinding()]
Param (
[switch]$Force
)
#Requires -Version 3
Push-Location -Path $PSScriptRoot
$Manifest = Invoke-Expression -Command ( Get-Content -Path *.psd1 | Out-String )
$ModuleName = $Manifest.RootModule -replace '\.psm1$',''
if ( Get-Module $ModuleName -ListAvailable ) {
$InstalledVersion = Get-Mo... |
PowerShellCorpus/PowerShellGallery/LAPS.Nano.DSC/1.0.0.5/Config/LAPS.Nano.DSC.Install.ps1 | LAPS.Nano.DSC.Install.ps1 | $ConfigData = @{
AllNodes = @(
@{ NodeName = "*" }
)
}
Configuration LAPS_Nano_Install
{
Param (
[Parameter()]
[ValidateSet("Present","Absent")]
[String]$Ensure = "Present"
)
Import-DscResource -ModuleName LAPS.Nano.DSC -ModuleVersion '1.0.0.5'
cLa... |
PowerShellCorpus/PowerShellGallery/LAPS.Nano.DSC/1.0.0.5/Config/LAPS.Nano.DSC.Config.ps1 | LAPS.Nano.DSC.Config.ps1 | Param
(
[Parameter(Mandatory=$false)]
[string]$AdminAccountName, #specify if you want to manage custom account
[Parameter(Mandatory=$false)]
[Boolean]$Enabled=$true, #solution 'Master Switch'
[Parameter(Mandatory=$false)]
[UInt32]$PasswordLength=14, #chars in p... |
PowerShellCorpus/PowerShellGallery/Base64/1.0.4/Tests/Base64.tests.ps1 | Base64.tests.ps1 | $ModuleRoot = Split-Path -Parent $PSScriptRoot
$ModuleFile = (Split-Path -Leaf $PSCommandPath) -replace '\.tests\.ps1$', '.psm1'
Import-Module "$ModuleRoot\$ModuleFile"
$TestText = 'Get-ChildItem $env:TEMP | ?{$_.LastWriteTime -lt (Get-Date).AddDays(-1)}'
$TestBase64 = 'RwBlAHQALQBDAGgAaQBsAGQASQB0AGUAbQAgACQAZQB... |
PowerShellCorpus/PowerShellGallery/Base64/1.0.4/Tests/appveyor.pester.ps1 | appveyor.pester.ps1 | # This script will invoke pester tests
# It should invoke on PowerShell v2 and later
# We serialize XML results and pull them in appveyor.yml
#If Finalize is specified, we collect XML output, upload tests, and indicate build errors
param(
[switch]$Finalize,
[switch]$Test,
[string]$ProjectRoot = $EN... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Examples/DscPullServerWeb_Configuration.ps1 | DscPullServerWeb_Configuration.ps1 |
Configuration DSCPullServerWithWeb
{
param
(
[Parameter(Mandatory = $true)]
[System.String]
$CertificateThumbPrint,
[Parameter(Mandatory = $true)]
[System.String]
$AuthorizationGroup
)
Import-DscResource -ModuleName PSDesiredStateConfiguration -ModuleVe... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Publish-DSCPullServerConfiguration.ps1 | Publish-DSCPullServerConfiguration.ps1 |
<#
.SYNOPSIS
Publish a MOF configuration to a DSC Pull Server.
.DESCRIPTION
The Publish-DSCPullServerConfiguration cmdlet uses the Invoke-RestMethod to
upload the MOF configuration to the DSC Pull Server. The DSC Pull Server Web
API must be deployed on the target DSC Pull Server.
.INPUTS
... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Get-DSCPullServerModule.ps1 | Get-DSCPullServerModule.ps1 |
<#
.SYNOPSIS
Returns PowerShell modules from a DSC Pull Server.
.DESCRIPTION
The Get-DSCPullServerModule cmdlet uses the Invoke-RestMethod to get the
PowerShell modules from a DSC Pull Server. The DSC Pull Server Web API must
be deployed on the target DSC Pull Server.
.INPUTS
None.
... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Update-DSCPullServerConfigurationChecksum.ps1 | Update-DSCPullServerConfigurationChecksum.ps1 |
<#
.SYNOPSIS
Update a MOF configuration checksum on a DSC Pull Server.
.DESCRIPTION
The Update-DSCPullServerConfigurationChecksum cmdlet uses the
Invoke-RestMethod to recalcualte the checksum file for an existing MOF
configuration. The DSC Pull Server Web API must be deployed on the target
... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Update-DSCPullServerModuleChecksum.ps1 | Update-DSCPullServerModuleChecksum.ps1 |
<#
.SYNOPSIS
Update a PowerShell module checksum on a DSC Pull Server.
.DESCRIPTION
The Update-DSCPullServerModuleChecksum cmdlet uses the Invoke-RestMethod to
recalcualte the checksum file for an existing PowerShell module. The DSC
Pull Server Web API must be deployed on the target DSC Pull S... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Publish-DSCPullServerModule.ps1 | Publish-DSCPullServerModule.ps1 |
<#
.SYNOPSIS
Publish a PowerShell module to a DSC Pull Server.
.DESCRIPTION
The Publish-DSCPullServerModule cmdlet uses the Invoke-RestMethod to upload
the PowerShell module to the DSC Pull Server. The DSC Pull Server Web API
must be deployed on the target DSC Pull Server.
.INPUTS
Non... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Get-DSCPullServerIdNode.ps1 | Get-DSCPullServerIdNode.ps1 |
<#
.SYNOPSIS
Returns all ConfigurationID nodes from a DSC Pull Server.
.DESCRIPTION
The Get-DSCPullServerIdNode cmdlet uses the Invoke-RestMethod to get the
ConfigurationID nodes from a DSC Pull Server. The DSC Pull Server Web API
must be deployed on the target DSC Pull Server.
.INPUTS
... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Unpublish-DSCPullServerConfiguration.ps1 | Unpublish-DSCPullServerConfiguration.ps1 |
<#
.SYNOPSIS
Unpublish an existing MOF configuration from a DSC Pull Server.
.DESCRIPTION
The Unpublish-DSCPullServerConfiguration cmdlet uses the Invoke-RestMethod
to remove a MOF configuration from the DSC Pull Server. The DSC Pull Server
Web API must be deployed on the target DSC Pull Serve... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Get-DSCPullServerNamesNode.ps1 | Get-DSCPullServerNamesNode.ps1 |
<#
.SYNOPSIS
Returns all ConfigurationNames nodes from a DSC Pull Server.
.DESCRIPTION
The Get-DSCPullServerNamesNode cmdlet uses the Invoke-RestMethod to get the
ConfigurationNames nodes from a DSC Pull Server. The DSC Pull Server Web API
must be deployed on the target DSC Pull Server.
.... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Unpublish-DSCPullServerModule.ps1 | Unpublish-DSCPullServerModule.ps1 |
<#
.SYNOPSIS
Unpublish an existing PowerShell module from a DSC Pull Server.
.DESCRIPTION
The Unpublish-DSCPullServerModule cmdlet uses the Invoke-RestMethod
to remove a PowerShell module from the DSC Pull Server. The DSC Pull Server
Web API must be deployed on the target DSC Pull Server.
... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Get-DSCPullServerReport.ps1 | Get-DSCPullServerReport.ps1 |
<#
.SYNOPSIS
Returns all reports from a DSC Pull Server.
.DESCRIPTION
The Get-DSCPullServerReport cmdlet uses the Invoke-RestMethod to get the
reports from a DSC Pull Server. The DSC Pull Server Web API must be deployed
on the target DSC Pull Server.
.INPUTS
None.
.OUTPUTS
DS... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Save-DSCPullServerModule.ps1 | Save-DSCPullServerModule.ps1 |
<#
.SYNOPSIS
Save a PowerShell module from the DSC Pull Server to the local system.
.DESCRIPTION
The Save-DSCPullServerModule cmdlet uses the Invoke-RestMethod to
download an existing PowerShell module from the DSC Pull Server. The DSC
Pull Server Web API must be deployed on the target DSC Pul... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Get-DSCPullServerConfiguration.ps1 | Get-DSCPullServerConfiguration.ps1 |
<#
.SYNOPSIS
Returns MOF configurations from a DSC Pull Server.
.DESCRIPTION
The Get-DSCPullServerConfiguration cmdlet uses the Invoke-RestMethod to get
the MOF configurations from a DSC Pull Server. The DSC Pull Server Web API
must be deployed on the target DSC Pull Server.
.INPUTS
N... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Functions/Save-DSCPullServerConfiguration.ps1 | Save-DSCPullServerConfiguration.ps1 |
<#
.SYNOPSIS
Save a MOF configuration from the DSC Pull Server to the local system.
.DESCRIPTION
The Save-DSCPullServerConfiguration cmdlet uses the Invoke-RestMethod to
download an existing MOF configuration from the DSC Pull Server. The DSC
Pull Server Web API must be deployed on the target ... |
PowerShellCorpus/PowerShellGallery/DSCPullServerWeb/1.1.0/Helpers/Update-SystemNetServicePointManager.ps1 | Update-SystemNetServicePointManager.ps1 |
function Update-SystemNetServicePointManager
{
[CmdletBinding(SupportsShouldProcess = $true)]
param
(
)
if ($PSCmdlet.ShouldProcess("System.Net.ServicePointManager", "Update SecurityProtocol to support Ssl3, Tls, Tls11, Tls12"))
{
try
{
[System.Net.ServicePointManag... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Import-Library.ps1 | Import-Library.ps1 | None |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Test-XboxSecurityEnabled.ps1 | Test-XboxSecurityEnabled.ps1 | function Test-XboxSecurityEnabled {
<#
.Synopsis
Queries whether secure connections are enabled or disabled.
.Description
Queries whether secure connections are enabled or disabled.
.Example
Test-XboxSecurityEnabled
#>
param(
[Parameter(ValueFromPipelineByPr... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Send-Xbox.ps1 | Send-Xbox.ps1 | function Send-Xbox
{
<#
.Synopsis
Sends simulated input to an Xbox 360 Controller
.Description
Sends simulated controller input through the debug channels.
Input can be simulated for any xbox 360 control.
When used together with the Start-Sleep cmdlet, this makes it p... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Set-XboxFileSize.ps1 | Set-XboxFileSize.ps1 | function Set-XboxFileSize
{
param(
[String]$FileName,
[Uint32]$FileOffset,
[Switch]$OpenExisting,
[Switch]$DoNotCreateNew,
[Switch]$CreateAlways
)
process {
$value = 0
$Result = $xbdm::DmSetFileSize($FileName,
$FileOffset, 0)
if ($Re... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Clear-XboxGamepadQueue.ps1 | Clear-XboxGamepadQueue.ps1 | function Clear-XboxGamepadQueue
{
<#
.Synopsis
Clears all packets from the queue for gamer input bound to the automation facility.
.Description
Clears all packets from the queue for gamer input bound to the automation facility.
.Example
Clear-XboxGamepadQueue 1
.Para... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Set-XboxTitle.ps1 | Set-XboxTitle.ps1 | function Set-XboxTitle {
<#
.Synopsis
Tells the system software which title to launch after the console is rebooted.
.Description
Tells the system software which title to launch after the console is rebooted with the DMBOOT_WAIT flag.
.Example
Set-XboxTitle "media:\Gears O... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/XbdmEnums.ps1 | XbdmEnums.ps1 | if (-not ('DMPL.PRIV' -as [Type])) {
Add-Type 'namespace DMPL {
public enum PRIV {
WRITE = 2,
READ = 1,
CONFIGURE = 8,
MANAGE = 16,
CONTROL = 4,
}
}'
}
Add-Type 'namespace XBDM {
public enum BOOT {
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Stop-XboxProfiling.ps1 | Stop-XboxProfiling.ps1 | function Stop-XboxProfiling {
<#
.Synopsis
Aborts collection of profiling data
.Description
Aborts collection of profiling data.
Abandons any buffered data and log file specified in the prior call to Start-XboxProfiling
.Example
Stop-XboxProfiling
#>
par... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Set-XboxAdminPassword.ps1 | Set-XboxAdminPassword.ps1 | function Set-XboxAdminPassword
{
param(
[Parameter(Mandatory=$true)]
[Management.Automation.PSCredential]$Credential
)
$result =
$xbdm::DmSetAdminPassword($Credential.GetNetworkCredential().PassWord)
if ($result -lt 0) {
Write-Error $xbdm::DmTranslateError($result... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Set-XboxSymbolSearchPath.ps1 | Set-XboxSymbolSearchPath.ps1 | function Set-XboxSymbolSearchPath {
<#
.Synopsis
Sets the search path to look for symbols when using the xbox debugger.
.Description
Sets the search path to look for symbols when using the xbox debugger.
#>
param(
[string]$Path
)
process {
$result... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Show-Dashboard.ps1 | Show-Dashboard.ps1 | function Show-Dashboard
{
Send-Xbox -XBox -Wait "0:0:3"
Send-Xbox -Y -Wait "0:0:3"
Send-Xbox -DPadUp -Wait "0:0:3"
Send-Xbox -A -Wait "0:0:2"
} |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Start-Xboxsignoff.ps1 | Start-Xboxsignoff.ps1 | function Start-Xboxsignoff
{
param(
[ValidateRange(1,4)]
[Int]
$Player = 1
)
Send-XboxControllerInput -Player $Player -XBox -Wait "0:0:2"
Send-XboxControllerInput -Player $Player -X -Wait "0:0:1"
Send-XboxControllerInput -Player $Player -DPadUp -Wait "0:0:0.25"
Send-XboxC... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Restart-Xbox.ps1 | Restart-Xbox.ps1 | function Restart-Xbox {
<#
.Synopsis
Reboots the host console.
.Description
Reboots the host console.
.Example
# Restarts the current title
Restart-Xbox
.Example
# Restarts the Xbox Cold
Restart-Xbox Cold
.Parameter Type
The ... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Connect-Xbox.ps1 | Connect-Xbox.ps1 | function Connect-Xbox
{
<#
.Synopsis
Connect-Xbox
.Description
Connects to an xbox 360. By default the connection times out after 8 hours and conversations time out after 1 hour.
.Example
Connect-Xbox MyXboxDevKit
#>
param(
[Parameter(Mandatory=$true,Valu... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Add-Xbox.ps1 | Add-Xbox.ps1 | function Add-Xbox
{
<#
.Synopsis
Adds an xbox to xbox neighborhood
.Description
Adds an xbox to xbox neighborhood
.Example
Add-Xbox MyXboxOne
#>
[CmdletBinding(DefaultParameterSetName="Neighborhood")]
param(
# The name or IP of the xbox developme... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Connect-XboxController.ps1 | Connect-XboxController.ps1 | function Connect-XboxController {
<#
.Synopsis
Simulates the physical connected presence of an Xbox 360 controller.
.Description
Simulates the physical connected presence of an Xbox 360 controller.
.Example
Connect-XboxController
.Parameter Player
The Number ... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Get-DumpMode.ps1 | Get-DumpMode.ps1 | function Get-XboxDumpMode
{
begin {
if (-not (Test-Path Variable:\XapDmGetDumpMode)) {
$Script:XapDmGetDumpMode = Add-Type -Name "Xap$(Get-Random)" '
[DllImport("xbdm.dll")]
static extern int DmGetDumpMode(out uint dumpMode);
', '
publi... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Show-InitialXboxSetup.ps1 | Show-InitialXboxSetup.ps1 | function Show-InitialXboxSetup
{
Show-SystemSettings
Send-XboxControllerInput -DPadDown
Send-XboxControllerInput -DPadDown
Send-XboxControllerInput -DPadDown
Send-XboxControllerInput -DPadDown
Send-XboxControllerInput -DPadDown
Send-XboxControllerInput -DPadDown
Send-XboxC... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Resume-XboxThread.ps1 | Resume-XboxThread.ps1 | function Resume-XboxThread {
<#
.Synopsis
Resumes execution for one or more threads suspended on the host console.
.Description
Resumes execution for one or more threads suspended on the host console.
.Example
Resume-XboxThread
.Link
Suspend-Thread
#>
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Disconnect-XboxDebugger.ps1 | Disconnect-XboxDebugger.ps1 | function Disconnect-XboxDebugger
{
begin {
if (-not (Test-Path Variable:\XapDmConnectDebugger)) {
$Script:XapDmConnectDebugger = Add-Type -Name "Xap$(Get-Random)" '
[DllImport("xbdm.dll")]
static extern int DmConnectDebugger(bool connected);
', '
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Stop-Xbox.ps1 | Stop-Xbox.ps1 | function Stop-Xbox
{
<#
.Synopsis
Turns an xbox console off
.Description
Turns an xbox 360 console off
.Example
Stop-Xbox
#>
param()
Send-Xbox -XBox -Wait "0:0:2"
Send-Xbox -DPadRight -Wait "0:0:1" -Repeat 2
Send-Xbox -DPadDown -Repe... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Select-MusicSource.ps1 | Select-MusicSource.ps1 | function Select-MusicSource
{
[CmdletBinding(DefaultParameterSetName="MusicSource")]
param(
[Parameter(ParameterSetName="MusicSource")]
[Int]$Source = 1,
[Parameter(ParameterSetName="GameAudio")]
[switch]$GameAudio
)
Send-Xbox -XBox -Wait "0:0:2"
Send-Xbox -DPad... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Start-XboxProfiling.ps1 | Start-XboxProfiling.ps1 | None |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Connect-XboxDebugger.ps1 | Connect-XboxDebugger.ps1 | function Connect-XboxDebugger
{
begin {
if (-not (Test-Path Variable:\XapDmConnectDebugger)) {
$Script:XapDmConnectDebugger = Add-Type -Name "Xap$(Get-Random)" '
[DllImport("xbdm.dll")]
static extern int DmConnectDebugger(bool connected);
', '
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Disconnect-XboxController.ps1 | Disconnect-XboxController.ps1 | function Disconnect-XboxController {
<#
.Synopsis
Simulates the physical disconnect of an Xbox 360 controller.
.Description
Simulates the physical disconnect of an Xbox 360 controller.
.Example
Disconnect-XboxController
.Parameter Player
The Number of the Pla... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Start-XboxCrashDump.ps1 | Start-XboxCrashDump.ps1 | function Start-XboxCrashDump {
<#
.Synopsis
Sends crash dump from the Xbox 360 to a Windows development machine
.Description
Sends crash dump information from an Xbox 360 console to a client running on a Windows development platform.
.Example
Start-XboxCrashDump
#>
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/XbpsDebugger.ps1 | XbpsDebugger.ps1 | $Script:XapDebugger = Add-Type -Namespace Xap -Name "XapDebugger$(Get-Random)" -MemberDefinition '
public enum StopConditions {
CreateThread = 1,
FirstChanceException = 2,
DebugString = 4,
StackTrace = 8,
ModuleLoad = 16,
TitleLaunch = 32,
PerformanceCounterStartup = 64
}
', '
[Dl... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Suspend-XboxThread.ps1 | Suspend-XboxThread.ps1 | function Suspend-XboxThread {
<#
.Synopsis
Suspends execution for threads on the console.
.Description
Suspends execution for threads on the console.
.Link
Resume-XboxThread
#>
param(
# The specific thread ID to resume
[Parameter(ParameterSetName='Threa... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Stop-ReceivingGamepadInput.ps1 | Stop-ReceivingGamepadInput.ps1 | function Stop-ReceivingGamepadInput
{
<#
.Synopsis
Stops a gamepad from recieving automated input and restores normal user interaction.
.Description
Stops a gamepad from recieving automated input and restores normal user interaction.
.Example
Stop-ReceivingGamepadInput
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Start-XboxTitle.ps1 | Start-XboxTitle.ps1 | function Start-XboxTitle {
<#
.Synopsis
Starts an xbox title
.Description
Starts an xbox title
.Example
Start-XboxTitle "media:\Gears Of War"
.Parameter Path
Path to the title
.Parameter CommandLineArguments
The command line arguments to the tit... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Show-SystemSettings.ps1 | Show-SystemSettings.ps1 | function Show-SystemSettings
{
Send-XboxControllerInput -XBox -Wait "0:0:2"
Send-XboxControllerInput -DPadRight -Wait "0:0:0.50"
Send-XboxControllerInput -DPadRight -Wait "0:0:0.50"
Send-XboxControllerInput -DPadDown #-Wait "0:0:0.25"
Send-XboxControllerInput -DPadDown #-Wait "0:0:0.25"
S... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/XbpsController.ps1 | XbpsController.ps1 | $mydir = $myinvocation.MyCommand.ScriptBlock.File | Split-Path
$cp = New-Object CodeDom.Compiler.CompilerParameters
$cp.CompilerOptions = "/unsafe"
#$cp.OutputAssembly = "$mydir\XapController.dll"
$t = Add-Type -PassThru -Name "XapController" -Namespace Xap -CompilerParameters $cp -UsingNamespace System.IO,
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Set-Xbox.ps1 | Set-Xbox.ps1 | function Set-Xbox
{
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
[Alias('DebugIPAddress')]
[string[]]
$Console,
[XDevKit.XboxDumpMode]
$DumpMode,
[XDevKit.XboxEventDeferFlags]
$EventDeferFlags,
[ValidateSet("NTSC-M","NTSC-J","PAL-I","VGA... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Enable-XboxCrashDump.ps1 | Enable-XboxCrashDump.ps1 | function Enable-XboxCrashDump
{
param(
[switch]$Smart
)
process {
if($Smart)
{
$Result = $xbdm::DmSetDumpMode(0)
}
else {
$Result = $xbdm::DmSetDumpMode(1)
}
if ($Result -lt 0) {
Write-Error $xbdm::Dm... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Stop-XboxThread.ps1 | Stop-XboxThread.ps1 | function Stop-XboxThread {
<#
.Synopsis
Stops a Thread on the Xbox as soon as possible.
.Description
Sends a request to the debugging subsystem that the specified thread break as soon as possible.
.Example
Stop-XboxThread
.Parameter ThreadId
The thread to st... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Start-XboxSignin.ps1 | Start-XboxSignin.ps1 | function Start-XboxSignin
{
<#
.Synopsis
Quickly signs in a player to a given profile number
.Description
Signs in a player to a given profile number
.Example
Start-XboxSignin
#>
param(
[ValidateRange(1,4)]
[int]
$Player = 1,
[ValidateR... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/ConvertTo-GamepadInput.ps1 | ConvertTo-GamepadInput.ps1 | function ConvertTo-GamepadInput {
param(
[Collections.Generic.Dictionary[string,string]]
$Dictionary
)
process {
Set-StrictMode -Off
$VerbosePreference = "continue"
Write-Verbose ($Dictionary | Out-String)
$gamepadInput = [Xap.XapController]::NewGamepad... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Add-XboxUser.ps1 | Add-XboxUser.ps1 | function Add-XboxUser {
<#
.Synopsis
Adds a user to the XBox
.Description
Adds a user to the list of those authorized to establish a secure connection
.Example
Add-XboxUser jamesbru -manage
.Parameter UserName
Name identifying the user to be added.
.Para... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Get-XboxTitlePid.ps1 | Get-XboxTitlePid.ps1 | function Get-XboxTitlePid {
<#
.Synopsis
Retrieves a title's process ID.
.Description
Retrieves a title's process ID.
.Example
Get-XboxTitlePid
#>
param()
($xbdm)::DmGetPid()
} |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/XbdmWrapper.ps1 | XbdmWrapper.ps1 | $cp = New-Object CodeDom.Compiler.CompilerParameters
$cp.CompilerOptions = "/unsafe"
Add-Type -CompilerParameters $cp @'
using System;
using System.IO;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Text;
namespace XBDM
{
[StructLayout(LayoutKin... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Rename-Xbox.ps1 | Rename-Xbox.ps1 | function Rename-Xbox
{
<#
.Synopsis
Renames a single xbox console
.Description
Renames a single xbox console
.Example
Rename-xbox xPowerShell xPowerShell2
#>
param(
[string]
$Console,
[String]
$NewName
)
process {
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Remove-Xbox.ps1 | Remove-Xbox.ps1 | function Remove-Xbox
{
<#
.Synopsis
Removes an xbox from an xbox neighborhood
.Description
Removes an xbox from an xbox neighborhood
.Example
Remove-Xbox MyXboxOne
#>
[CmdletBinding(DefaultParameterSetName="Neighborhood")]
param(
# The name or IP... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Disable-XboxCrashDump.ps1 | Disable-XboxCrashDump.ps1 | function Disable-XboxCrashDump
{
param(
)
process {
$Result = $xbdm::DmSetDumpMode(2)
if ($Result -lt 0) {
Write-Error $xbdm::DmTranslateError($Result)
}
}
} |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Get-Xbox.ps1 | Get-Xbox.ps1 | function Get-Xbox
{
<#
.Synopsis
Gets the currently connected xboxes from Xbox Neighborhood or connects to a new xbox
.Description
Gets the currently connected xboxes from Xbox Neighborhood or connects to a new xbox
.Example
Get-Xbox
# Gets all of the xboxes from... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Remove-XboxFile.ps1 | Remove-XboxFile.ps1 | function Remove-XboxFile
{
param(
[string]$filename,
[switch]$isdirectory
)
process {
$Result = $xbdm::DmDeleteFile($filename, $isdirectory)
if ($Result -lt 0) {
Write-Error $xbdm::DmTranslateError($Result)
}
}
} |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Get-XboxScreenshot.ps1 | Get-XboxScreenshot.ps1 | function Get-XboxScreenshot
{
param(
[Parameter(ValueFromPipelineByPropertyName=$true)]
[String]$OutputFile,
[Parameter(ValueFromPipelineByPropertyName=$true)]
[Alias('DebugIPAddress')]
[String[]]
$Console,
[Switch]
$Bitmap
)
process {
... |
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Show-XboxAchievement.ps1 | Show-XboxAchievement.ps1 | function Show-XboxAchievement
{
param(
[ValidateRange(1,4)]
[Int]
$Player = 1
)
Send-XboxControllerInput -Player $Player -XBox -Wait "0:0:2"
Send-XboxControllerInput -Player $Player -DPadLeft -Wait "0:0:1"
Send-XboxControllerInput -Player $Player -A
}
|
PowerShellCorpus/PowerShellGallery/XBPS/0.1/Examples/ContinuousCapture.ps1 | ContinuousCapture.ps1 | Start-Job -ArgumentList (New-TimeSpan -Seconds 1) {
param([Timespan]$interval)
Import-Module XBPS, PSImageTools
$Counter = 1
while ($true) {
Get-XboxScreenshot "${env:UserProfile}\xbox.$counter.bmp" |
Get-Image |
ConvertTo-Jpeg -Remove
St... |
PowerShellCorpus/PowerShellGallery/parse-curl/1.0.3/Parse-Curl.Tests.ps1 | Parse-Curl.Tests.ps1 | $here = Split-Path -Parent $MyInvocation.MyCommand.Path
$sut = (Split-Path -Leaf $MyInvocation.MyCommand.Path).Replace(".Tests.ps1", ".psd1")
Import-Module "$here\$sut" -Force
Describe "Curl Parsing" {
Context "Get URI" {
$params = 'curl http://www.telize.com/geoip' | Parse-Curl
It "Uri should be ... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/Install.ps1 | Install.ps1 | Set-StrictMode -Version 2
function Install-TelligentCommunity {
<#
.Synopsis
Sets up a new Telligent Community.
.Description
The Install-TelligentCommunity cmdlet automates the process of creating a new Telligent Evolution community.
It takes the installation package, and from it deploys the websi... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/initalise.ps1 | initalise.ps1 | Set-StrictMode -Version 2
#Undo SQLPs's forcing the SqlServer drive
if((get-location).Provider.Name -eq 'SqlServer') {
get-location -PSProvider FileSystem | Set-Location
}
|
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/sql.ps1 | sql.ps1 | Set-StrictMode -Version 2
function Test-SqlServer {
<#
.SYNOPSIS
Tests if a SQL Server exists and can be connected to. Optonally checks for a specific database or table.
.PARAMETER Server
The SQL Server to test
.PARAMETER Database
The database to test exists on the SQL... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/Configuration.ps1 | Configuration.ps1 | Set-StrictMode -Version 2
function Test-TelligentPath {
<#
.SYNOPSIS
Tests if a SQL Server exists and can be connected to. Optonally checks for a specific database or table.
.PARAMETER Path
The path to test for a Teligent Community
.PARAMETER AllowEmpty
Specifies that a... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/Packages.ps1 | Packages.ps1 | Set-StrictMode -Version 2
$versionRegex = [regex]'[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
function Get-TelligentVersion {
<#
.SYNOPSIS
Gets a list of Teligent Community builds in the TelligentPackages directory.
.PARAMETER Version
Filters to the most recent build whose version matches the given... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/zip.ps1 | zip.ps1 | Set-StrictMode -Version 2
function Expand-Zip {
<#
.Synopsis
Extracts files or directories from a zip folder
.Parameter Path
The path to the Zip folder to extract
.Parameter Destination
The location to extract the files to
.Parameter ZipDirectory
The directory within the zip fold... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/VersionInfo.ps1 | VersionInfo.ps1 | $versionDllNames = [ordered]@{
Platform = 'Telligent.Evolution.Components.dll', 'CommunityServer.Components.dll'
Calendar = 'Telligent.Evolution.Extensions.Calendar.dll'
Chat = 'Telligent.Evolution.Chat.dll'
DocPreview = 'Telligent.Evolution.FlexPaperDocumentViewer.dll'
Ideation = 'Telligent.Ev... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/solr.ps1 | solr.ps1 | Set-StrictMode -Version 2
function Add-SolrCore {
<#
.SYNOPSIS
Creates a new Solr Core for a Telligent Community
.PARAMETER Name
The name of the Solr Core to create
.PARAMETER Package
The Telligent Community installation package to use to create the core
.PARAMETER... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/JobScheduler.ps1 | JobScheduler.ps1 | Set-StrictMode -Version 2
function Install-TelligentJobScheduler {
<#
.SYNOPSIS
Installs the Telligent Job Scheduler
.PARAMETER JobSchedulerPath
The path to install the Job Scheduler at
.PARAMETER Package
The installation package containing the Job Scheduler ins... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/utility.ps1 | utility.ps1 | Set-StrictMode -Version 2
function Write-ProgressFromVerbose {
<#
.SYNOPSIS
Executes a script, and redirects any output on the verbose stream to Write-Progress.
.PARAMETER Activity
The Activity to pass to Write-Progress
.PARAMETER Status
The Status to pass to Write-... |
PowerShellCorpus/PowerShellGallery/TelligentInstall/0.0.6/iis.ps1 | iis.ps1 | Set-StrictMode -Version 2
function New-TelligentWebsite {
<#
.SYNOPSIS
Creates a new Telligent Community website
.DESCRIPTION
Creates a new Telligent Community Website, including extracting the installation package, creating the IIS website and setting up filestorage.
.PARAMETER... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Initialize-ISHRegistry.ps1 | Initialize-ISHRegistry.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Set-ISHFirewallHTTPS.ps1 | Set-ISHFirewallHTTPS.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHToolDotNET.ISH12.ps1 | Install-ISHToolDotNET.ISH12.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHToolDotNET.ISH13.ps1 | Install-ISHToolDotNET.ISH13.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Test-ISHServerCompliance.ps1 | Test-ISHServerCompliance.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHToolAntennaHouse.ps1 | Install-ISHToolAntennaHouse.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Set-ISHFirewallOracle.ps1 | Set-ISHFirewallOracle.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHWindowsFeature.ps1 | Install-ISHWindowsFeature.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHToolMSXML4.ps1 | Install-ISHToolMSXML4.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
PowerShellCorpus/PowerShellGallery/ISHServer.12/1.5/Install-ISHToolHtmlHelp.ps1 | Install-ISHToolHtmlHelp.ps1 | <#
# Copyright (c) 2014 All Rights Reserved by the SDL Group.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.