filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
3126.ps1 |
function Send-WakeOnLan
{
[CmdletBinding()]
param(
[Parameter(
Position=0,
Mandatory=$true,
HelpMessage='MAC-Address of the remote computer which you want to wake up')]
[ValidateScript({
if($_ -match "^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{... | 0 |
PowerShell Template_2.ps1 | Function New-Script
{
$strName = $env:username
$date = get-date -format d
$name = Read-Host "Filename"
if ($name -eq "") { $name="NewTemplate" }
$email = Read-Host "eMail Address"
if ($email -eq "") { $email="genemagerr@hotmail.com" }
$comment=@();
while($s = (Read-Host "Comment").Trim()){$comment+="$s`r`n#"}
... | 0 |
New-Struct_1.ps1 | ## New-Struct
## Creates a Struct class and emits it into memory
## The Struct includes a constructor which takes the parameters in order...
##
## Usage:
## # Assuming you have a csv file with no header and columns: artist,name,length
## New-Struct Song @{
## Artist=[string];
## Name=[string];
... | 0 |
sample_61_56.ps1 | #using module .\ClientContext
#using module .\ALExtBridge
function Run-AlTestsInternal
(
[string] $TestSuite = $script:DefaultTestSuite,
[string] $TestCodeunitsRange = "",
[string] $TestProcedureRange = "",
[string] $ExtensionId = "",
[int] $TestRunnerId = $global:DefaultTestRunner,
[... | 0 |
Test-Certificate.ps1 | #####################################################################
# Test-Certificate.ps1
# Version 0.63
#
# Tests specified certificate for certificate chain and revocation
#
# Vadims Podans (c) 2009
# http://www.sysadmins.lv/
#####################################################################
#requires ... | 0 |
sample_14_33.ps1 | @{
GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
HelpInfoURI = 'https://aka... | 0 |
2284.ps1 | param(
[parameter(Mandatory=$true)]
$ResourceID,
[parameter(Mandatory=$true)]
$SiteServer
)
function Load-Form {
$Form.Controls.Add($ComboBox)
$Form.Controls.Add($Button)
$Form.Add_Shown({$Form.Activate()})
$Form.Add_Shown({Get-IPAddresses})
[void]$Form.ShowDialog()
}
function Get-CMSiteCode {
$CMSi... | 0 |
Get-GoogleSpreadsheets.ps1 | #requires -version 2
Function Get-GoogleSpreadSheets {
param(
$userName = $(throw 'Please specify a user name'),
$password = $(throw 'Please specify a password')
)
Add-Type -Path "C:\\Program Files\\Google\\Google Data API SDK\\Redist\\Google.GData.Client.dll"
Add-Type -Path "C:... | 0 |
sample_2_63.ps1 | #************************************************
# DC_SmbClient-Component.ps1
# Version 1.1
# Date: 2009-2019
# Author: Boyd Benson (bbenson@microsoft.com) +WalterE
# Description: Collects information about the SMB Client.
# Called from: Main Networking Diag, etc.
#**********************************************... | 0 |
1911.ps1 |
Describe 'Get-Error tests' -Tag CI {
BeforeAll {
$skipTest = -not $EnabledExperimentalFeatures.Contains('Microsoft.PowerShell.Utility.PSGetError')
if ($skipTest) {
Write-Verbose "Test Suite Skipped. The test suite requires the experimental feature 'Microsoft.PowerShell.Utility.PSGetEr... | 0 |
sample_5_15.ps1 |
[ dynamic, provider("dcismprovider"),
Description ("The power management capabilities of the element are "
"decoupled from a PowerManagementService, "
"because a single service could apply to multiple elements, each "
"with specific capabilities.")
]
class DCIM_CSPowerManagementCapabilities : CIM_Pow... | 0 |
sample_2_8.ps1 | # <copyright>
# INTEL CONFIDENTIAL
#
# Copyright 2021 Intel Corporation
#
# This software and the related documents are Intel copyrighted materials, and your use of
# them is governed by the express license under which they were provided to you ("License").
# Unless the License provides otherwise, you may not us... | 0 |
New-XVM_10.ps1 | Function New-XVM
{
[cmdletbinding()]
Param
(
[Parameter(Mandatory=$false,Position=1)]
[string]$ComputerName=$env:COMPUTERNAME,
[Parameter(Mandatory=$true,Position=2)]
[string]$Name,
[Parameter(Mandatory=$true,Position=3)]
[string]$SwitchName,... | 0 |
sample_34_76.ps1 | #!/usr/bin/env pwsh
<#
.SYNOPSIS
Stub around Invoke-Pester command used by VSCode PowerShell extension.
.DESCRIPTION
The stub checks the version of Pester and if >= 4.6.0, invokes Pester
using the LineNumber parameter (if specified). Otherwise, it invokes
using the TestName parameter (if specif... | 0 |
Exchange AutoReply Admin.ps1 | <#
.NOTES
Name : Exchange Automatic Replies Administrator.ps1
Author : Bryan Jaudon <bryan.jaudon@gmail.com>
Version : 1.0
Date : 11/23/2012
.SYNOPSIS
Provides a graphical front-end to the Get-MailboxAutoReplyConfiguration and
Set-MailboxAutoReplyConfiguration Exch... | 0 |
4473.ps1 |
$configFile = [System.IO.Path]::ChangeExtension($MyInvocation.MyCommand.Path, 'json')
if (Test-Path -Path $configFile)
{
$ConfigurationData = Get-Content -Path $configFile | ConvertFrom-Json
}
else
{
$ConfigurationData = @{
AllNodes = @(
@{
NodeName = 'localho... | 0 |
sample_41_0.ps1 | # Localized 04/14/2024 08:54 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=Д&а
PromptNoString=&Нет
BundleFound=Найденный набор: {0}
PackageFound=Обнаружен пакет: {0}
EncryptedBundleFound=Найден зашифрованный набор: {0}
EncryptedPackageFoun... | 0 |
sample_37_6.ps1 | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
function Import-EditorCommand {
<#
.EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml
#>
[OutputType([Microsoft.PowerShell.EditorServices.Extensions.EditorCommand, Microsoft.PowerShell.EditorServices])]
[Cmdle... | 0 |
2483.ps1 |
[CmdletBinding()]
param (
[string]$ClassSearchString = '*',
[string]$PropertySearchString = '*',
[string]$Namespace = 'root',
[ValidateScript({ Test-Connection -ComputerName $_ -Quiet -Count 1 })]
[string]$Computername = 'localhost'
)
begin {
$ErrorActionPreference = [System.Management.Automation.ActionPreferen... | 0 |
4160.ps1 |
Set-Variable -Name Errors -Value $null -Scope Global -Force
Set-Variable -Name LogFile -Value $Env:windir"\Logs\BuildLogs\CCTK.log" -Scope Global -Force
Set-Variable -Name BuildLog -Value $Env:windir"\Logs\BuildLogs\Build.log" -Scope Global -Force
Set-Variable -Name RelativePath -Scope Global -Force
Function Consol... | 0 |
sample_16_67.ps1 | #************************************************
# TS_2K3PoolUsageMaximum.ps1
# Version 1.0.1
# Date: 5/8/2012
# Author: v-kaw
# Description: [Idea ID 2446] [Windows] Determining the trimming threshold set by the Memory Manager
# Rule number: 2446
# Rule URL: //sharepoint/sites/rules/Rule%20Submissions/Forms... | 0 |
sample_51_1.ps1 |
///////////////////////////////////////////////////////////////////////////////
// Constants
// MUST be kept in sync with the constants used in TreDesigner
///////////////////////////////////////////////////////////////////////////////
var kOrthographicCameraUniqueId = "Microsoft.VisualStudio.3D.OrthographicCamer... | 0 |
2333.ps1 |
[CmdletBinding(DefaultParameterSetName = 'Default')]
param (
[Parameter()]
[ValidateNotNullOrEmpty()]
[string[]]$DhcpServer,
[Parameter(ParameterSetName = 'HostName')]
[ValidateNotNullOrEmpty()]
[string[]]$HostName,
[Parameter(ParameterSetName = 'MacAddress')]
[ValidateNotNullOrEmpty()]
[string[]]$MacAddr... | 0 |
3761.ps1 |
function Test-CreateIntegrationAccount
{
$resourceGroup = TestSetup-CreateResourceGroup
$integrationAccountName = "IA-" + (getAssetname)
$location = Get-Location "Microsoft.Logic" "integrationAccounts"
$integrationAccountNameBasic = "IA-Basic-" + (getAssetname)
$integrationAccount = New-AzIntegrati... | 0 |
ShowUI Clock 6.ps1 | New-UIWidget -AsJob -Content {
$shadow = DropShadowEffect -Color Black -Shadow 0 -Blur 8
$now = Get-Date;
StackPanel {
TextBlock -Name "Time" ('{0:h:mm tt}' -f $now) -FontSize 108 -LineHeight 100 -LineStackingStrategy BlockLineHeight -Margin 0 -Padding 0 -Foreground White -Effect $shadow -FontFa... | 0 |
sample_16_29.ps1 | # Rule ID: 3416
#
# Rule checking to see if Power Plan of the server is set to High Performance
#
# Created: 7/19/2012
# Author: Jonathan Randall
#******************************************************************************************************************
Import-LocalizedData -BindingVariable Localized... | 0 |
sample_62_87.ps1 | #
# Module manifest for module 'OCI.PSModules.Mysql'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Mysql.dll'
# Version number of this module.
ModuleVersion = '89.0.0'
# Supported PSEditions
Compatible... | 0 |
1476.ps1 |
function Publish-BitbucketDownload
{
[CmdletBinding()]
param(
[pscredential]
$Credential,
[Parameter(Mandatory=$true)]
[string]
$Username,
[Parameter(Mandatory=$true)]
[string]
$ProjectName,
... | 0 |
3076.ps1 | $global:ValidatorRoot = Split-Path $MyInvocation.MyCommand.Path
BeforeEachFeature {
New-Module -Name ValidatorTestDe {
. $global:ValidatorRoot\ValidatorDe.ps1 -Verbose
} | Import-Module -Global
}
AfterEachFeature {
Remove-Module ValidatorTestDe
}
Given 'MeinValidator gibt vor, True zurückzugeben'... | 0 |
sample_44_33.ps1 | # Implement your module commands in this script.
# Export only the functions using PowerShell standard verb-noun naming.
# Be sure to list each exported functions in the FunctionsToExport field of the module manifest file.
# This improves performance of command discovery in PowerShell.
Export-ModuleMember -Function *... | 0 |
sample_33_85.ps1 | #
# Script module for module 'Az.HealthcareApis' that is executed when 'Az.HealthcareApis' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 04/23/2024 13:01:41
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
... | 0 |
1931.ps1 |
Describe "Set-Alias DRT Unit Tests" -Tags "CI" {
It "Set-Alias Invalid Scope Name should throw PSArgumentException"{
{ Set-Alias -Name "ABCD" -Value "foo" -Scope "bogus" } | Should -Throw -ErrorId "Argument,Microsoft.PowerShell.Commands.SetAliasCommand"
}
It "Set-Alias ReadOnly Force"{
Set-Alias -Name ABCD... | 0 |
sample_56_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Globallydistributeddatabase'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Globallydistributeddatabase.dll'
# Version number of this module.
ModuleVersion =... | 0 |
sample_35_53.ps1 | #
# Module manifest for module 'OCI.PSModules.Waf'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Waf.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
3466.ps1 |
function Test-GetNonExistingDataBoxJob
{
$dfname = Get-DataBoxJobName
$rgname = Get-ResourceGroupName
$rglocation = Get-ProviderLocation ResourceManagement
New-AzResourceGroup -Name $rgname -Location $rglocation -Force
Assert-ThrowsContains { Get-AzDataBoxJob -Resourc... | 0 |
2901.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestProperties
task TestProperties -requiredVariables z{
}
| 0 |
sample_7_1.ps1 | BT
/GS0 gs
/TT0 1 Tf
-0.0003 Tc 10.02 0 0 10.02 72 709.98 Tm
(c.)Tj
/TT1 1 Tf
-0.0007 Tc 0.0011 Tw 1.796 0 Td
[(If you are a )5.9(MPN )5.9(Member)]TJ
/TT0 1 Tf
0 Tc 0 Tw 12.784 0 Td
(:)Tj
-0.001 Tc -12.784 -1.204 Td
(i.)Tj
-0.0003 Tc -0.0008 Tw 1.796 0 Td
[(Each licen)6.4(se )6(acquired on b)7.5(e)-0.9(half of y)6.7(o)... | 0 |
Get-NestedGroups v2.ps1 | Function Get-NestedGroups {
<#
.SYNOPSIS
Enumerate all AD group memberships of an account (including nested membership).
.DESCRIPTION
This script will return the AD group objects for each group the user is a member of.
.PARAMETER UserName
The username whose group memberships to find.
.EXAMPLE
... | 0 |
sample_38_97.ps1 | #
# Module manifest for module 'OCI.PSModules.Clusterplacementgroups'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Clusterplacementgroups.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
... | 0 |
Create-SCCMCollection_1.ps1 | function Create-SCCMCollection
{
param($Server = $Env:ComputerName, $Name, $Site, $ParentCollectionID = "COLLROOT")
$ColClass = [WMIClass]"\\\\$Server\\Root\\SMS\\Site_$($Site):SMS_Collection"
$Col = $ColClass.PSBase.CreateInstance()
$Col.Name = $Name
$Col.OwnedByThisSite = $True
$Col.Comment = "Collection $Na... | 0 |
1014.ps1 |
$random = (New-Guid).ToString().Substring(0,8)
$subscriptionId = "my-azure-subscription-id"
$apimServiceName = "apim-$random"
$resourceGroupName = "apim-rg-$random"
$location = "Japan East"
$organisation = "Contoso"
$adminEmail = "admin@contoso.com"
$swaggerUrl = "http://petstore.swagger.io/v2/swagger.json"
... | 0 |
sample_58_47.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
##
## TODO: Refactor the cer... | 0 |
sample_64_87.ps1 | # ------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
# ------------------------------------------------------------
param (
[Parameter(Manda... | 0 |
Move-VMThin SVMotion.ps1 | function Move-VMThin {
PARAM(
[Parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Virtual Machine Objects to Migrate")]
[ValidateNotNullOrEmpty()]
[System.String]$VM
,[Parameter(Mandatory=$true,HelpMessage="Destination Datastore")]
[ValidateNotNullOrE... | 0 |
sample_2_34.ps1 | param( [string]$DataPath, `
[switch]$AcceptEula, `
[switch]$Trace, `
[switch]$Logs, `
[switch]$Activity, `
[switch]$Fwd, `
[switch]$FwdCli, `
[switch]$RemShell, `
[switch]$HTTPSYS, `
[switch]$WinHTTP, `
[switch]$CAPI, `
[switch]$Ker... | 0 |
1176.ps1 |
Set-StrictMode -Version 'Latest'
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
Describe 'Get-User' {
It 'should get all users' {
$users = Get-User
try
{
$users | Should -Not -BeNullOrEmpty
$users.Length | Should -BeGre... | 0 |
sample_20_15.ps1 | #************************************************
# TS_SysvolNetLogonShareCheck.ps1
# Version 1.0.1
# Date: 03-29-2011
# Author: Your Name - Your Email Address
# Description: SYSVOL and/or NETLOGON shares are missing on domain controller
#************************************************
Import-LocalizedData -... | 0 |
sample_13_25.ps1 | @{
GUID = "1DA87E53-152B-403E-98DC-74D7B4D63D59"
Author = "PowerShell"
CompanyName = "Microsoft Corporation"
Copyright = "Copyright (c) Microsoft Corporation."
ModuleVersion = "7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion = "3.0"
CmdletsToExport = @(
'Export-Alias', 'Get-Alias', 'Import-Alias', 'New-Al... | 0 |
sample_61_84.ps1 | @{
GUID="56D66100-99A0-4FFC-A12D-EEE9A6718AEF"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
FunctionsToExport = @()
CmdletsToExport="Start-Transcript", "Stop-Transcript"
AliasesTo... | 0 |
sample_29_90.ps1 | #
# Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker'
#
# Generated by: Microsoft Corporation
#
# Generated on: 19/01/2022
#
@{
# Script module or binary module file associated with this manifest.
RootModule = ''
# Version number of this module.
ModuleVersion = '1.2100.25... | 0 |
2065.ps1 |
Describe 'Task-based PowerShell async APIs' -Tags 'CI' {
BeforeAll {
$sbStub = @'
.foreach{
[pscustomobject]@{
Time = [DateTime]::Now.ToString('yyyyMMddTHHmmss.fffffff')
Value = $_
ThreadId = [System.Threading.Thread]::CurrentThread.ManagedThreadId
Runspace... | 0 |
sample_45_29.ps1 | #
# Module manifest for module 'OCI.PSModules.Core'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Core.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
CompatiblePS... | 0 |
AD FSMO Roles.ps1 | function Get-FSMORole {
<#
.SYNOPSIS
Retrieves the FSMO role holders from one or more Active Directory domains and forests.
.DESCRIPTION
Get-FSMORole uses the Get-ADDomain and Get-ADForest Active Directory cmdlets to determine
which domain controller currently holds each of the Active Directory FSMO roles.
.PARA... | 0 |
1250.ps1 |
function Grant-CHttpUrlPermission
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[string]
$Url,
[Parameter(Mandatory=$true)]
[Alias('Identity')]
[string]
$Principal,
[Parameter(Mandatory=$true)]
[Carbon.Se... | 0 |
Read-Choice_3.ps1 | # function Read-Choice {
#.Synopsis
# Prompt the user for a choice, and return the (0-based) index of the selected item
#.Parameter Message
# This is the prompt that will be presented to the user. Basically, the question you're asking.
#.Parameter Choices
# An array of strings representing the choices (or me... | 0 |
sample_46_92.ps1 | #
# Module manifest for module 'GCArcService'
#
# Generated by: Microsoft
#
# Generated on: 08/09/2020
#
@{
# Script module or binary module file associated with this manifest.
ModuleToProcess = 'GCArcService.psm1'
# Version number of this module.
ModuleVersion = '1.0'
# ID used to uniquely identify... | 0 |
2205.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[ValidateNotNullOrEmpty()]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMessag... | 0 |
sample_9_1.ps1 |
#************************************************
# DC_W32Time.ps1
# Version 1.0
# Date: 12-22-2010
# Author: clandis
# Description: Collects W32Time information
#************************************************
PARAM([string]$LogType="Full")
Import-LocalizedData -BindingVariable W32TimeStrings -FileName ... | 0 |
2988.ps1 | function Get-ShouldOperator {
[CmdletBinding()]
param ()
DynamicParam {
$ParameterName = 'Name'
$RuntimeParameterDictionary = New-Object System.Management.Automation.RuntimeDefinedParameterDictionary
$AttributeCollection = New-Object System.Collections.Obje... | 0 |
sample_11_62.ps1 | #
#
# Rule to look for organizations that are newer than the deployment
#
# Created: 5/24/2012
# Author: Jonathan Randall
#******************************************************************************************************************
#region Functions
function GetOrganizationData([string] $conn_string)
... | 0 |
ELIM (Event Log IM) 1.0.ps1 | $ELIMServer = $Env:ComputerName
$ELIMChannel = "ELIM"
$ELIMUser = $Env:UserName
function New-ELIMUser {
#.Synopsis
# Send a message to the ELIM (Event Log Instant Messaging) Log
[CmdletBinding()]
param (
# The Computer whose event logs will be used for instant messaging
[String]$Server = $ELIMServer,... | 0 |
2449.ps1 | function Backup-VM
{
[CmdletBinding(SupportsShouldProcess)]
param
(
[Parameter(Mandatory, ValueFromPipeline)]
[ValidateNotNullOrEmpty()]
[VMware.VimAutomation.ViCore.Impl.V1.Inventory.VirtualMachineImpl[]]
$VM,
[Parameter(Mandatory)]
[ValidateNotNullOrEmpty()]
[ValidateScript({ Test-Path -Path $_ ... | 0 |
sample_56_85.ps1 | # Localized 05/07/2022 06:56 AM (GMT) 303:7.0.30723 CL_LocalizationData.psd1
# Localized 01/04/2013 11:32 AM (GMT) 303:4.80.0411 CL_LocalizationData.psd1
ConvertFrom-StringData @'
###PSLOC
Program_Choice_NOTLISTED=Listelenmeyen
Version_Choice_DEFAULT=Yok
Version_Choice_WIN8RTM=Windows 8
Version_Choice_WIN7RTM=... | 0 |
sample_4_90.ps1 | Param(
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
[ValidateSet('Release', 'RTP', 'Preview')]
$NugetConfiguration,
[Parameter(ValueFromPipelineByPropertyName = $true, Mandatory = $true)]
[ValidateSet('bc20', 'bc23', 'bc25')]
$BCVersion,
$configDirectory = "... | 0 |
sample_0_24.ps1 | #
# Module manifest for module 'OCI.PSModules.Ailanguage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ailanguage.dll'
# Version number of this module.
ModuleVersion = '93.0.0'
# Supported PSEditions
... | 0 |
sample_25_90.ps1 | #
# Module manifest for module 'OCI.PSModules.Marketplace'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Marketplace.dll'
# Version number of this module.
ModuleVersion = '82.0.0'
# Supported PSEdition... | 0 |
sample_52_70.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=A szükséges PowerShell-modul (FailoverClusters) nem található. A telepítéshez használja a Szerepkörök és szolgáltatások eszközt: Távoli kiszolgálófelügyelet eszközei | Szolgáltatásfelügyeleti eszközök | Feladatátvételi fürtszolgáltatás eszközei | Windows PowerSh... | 0 |
Deleted-Folders.ps1 | function Deleted-Folders(){
param (
$Computer,
[String[]]$SeachFoldersDeleted
)
$Info = $null
$Disks = $null
trap {Write-Host "Error WmiObject $Computer";Continue}
$Disks += Get-WmiObject win32_logicaldisk -ComputerName $Computer |
Where-Object {$_.Size -ne $null}
foreach ($Disk in $Disks){
if... | 0 |
3868.ps1 |
function Get-ResourceGroupName
{
return "RGName-" + (getAssetName)
}
function Get-NotificationHubName
{
return "NotificationHub-" + (getAssetName)
}
function Get-NamespaceName
{
return "Namespace-" + (getAssetName)
}
function Is-NamespaceActive($resourceGroupName, $namespaceName)
{
... | 0 |
sample_29_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Licensemanager'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Licensemanager.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSE... | 0 |
sample_51_36.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=找不到必要的 PowerShell 模組 (FailoverClusters)。請使用角色與功能工具來安裝: 遠端伺服器管理工具 | 功能管理工具 | 容錯移轉叢集工具 | Windows PowerShell 的容錯移轉叢集模組。
HyperVModuleRequired=找不到必要的 PowerShell 模組 (Hyper-V)。請使用角色與功能工具來安裝: 遠端伺服器管理工具 | 角色管理工具 | Hyper-V 管理工具 | Windows PowerShell 的 Hyper-V 模組。
CimCmdl... | 0 |
sample_4_42.ps1 | ConvertFrom-StringData @'
id_vssbackuppkgfiles=Windows Server Backup Files
id_vssbackuppkgfilesobtaining=Obtaining Windows Server Backup log files
'@
# SIG # Begin signature block
# MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNL... | 0 |
1957.ps1 |
Describe "Select-String" -Tags "CI" {
BeforeAll {
$nl = [Environment]::NewLine
$currentDirectory = $pwd.Path
}
AfterAll {
Push-Location $currentDirectory
}
Context "String actions" {
$testinputone = "hello","Hello","goodbye"
$testinputtwo = "hello","Hello... | 0 |
sample_19_2.ps1 | #
# Module manifest for module 'OCI.PSModules.Bds'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Bds.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_20_98.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Attestation.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Attestation.internal.psm1'
if(Test-Path $internalModulePath) {
... | 0 |
sample_4_25.ps1 | #************************************************
# TS_StoreAppsFailureForVideoResolutionCheck.ps1
# Version 1.0.1
# Date: 3/13/2013
# Author: v-blchen
# Description: [Idea ID 6253] [Windows] Win8:APP - Store Apps do not launch due to video resolution
# Rule number: 6253
# Rule URL: http://sharepoint/sites/ru... | 0 |
sample_63_80.ps1 |
# ----------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# 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 Licen... | 0 |
The PowerShell Talk Xen_1.ps1 | #The PowerShell Talk
#Demo 2 - VM Easy Bake Oven
#XenServer
#Connect to XenServer
Get-Credential | connect-Xenserver -Url http://XenServer_URL/sdk
#Create the new VM
Create-XenServer:VM -NameLabel "Dave" -VCPUsAtStartup 1 -MemoryDynamicMax 536870912 -MemoryStaticMax 536870912 -MemoryDynamicMin 536870912 -Memo... | 0 |
2551.ps1 |
[reflection.assembly]::LoadwithPartialName("Microsoft.SQLServer.SMO") | out-Null
[boolean]$defaulted = $false
if ($args[0] -ne $null) {
$server = $args[0] }
else {
$server = "default_server"
$defaulted = $true
}
if ($args[1] -ne $null) {
$filename = $args[1] }
else {
$filen... | 0 |
sample_29_59.ps1 | #
# Module manifest for module 'OCI.PSModules.Cloudbridge'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported PSEdition... | 0 |
sample_62_61.ps1 | #
# Module manifest for module 'OCI.PSModules.Networkloadbalancer'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Networkloadbalancer.dll'
# Version number of this module.
ModuleVersion = '89.0.0'
# Sup... | 0 |
sample_45_85.ps1 | #
# Module manifest for module 'OCI.PSModules.Jms'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Jms.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
Read-Choice.ps1 | function Read-Choice {
#.Synopsis
# Prompt the user for a choice, and return the (0-based) index of the selected item
#.Parameter Message
# The question to ask
#.Parameter Choices
# An array of strings representing the "menu" items, with optional ampersands (&) in them to mark (unique) characters to be used to... | 0 |
sample_24_24.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.apa... | 0 |
MWE_UsageSample.psm1.ps1 | # ModuleWriteErrorUsageExample.psm1
# To use this you need to have the ModuleWriteError module loaded.
#Import-Module c:\\scripts\\ModuleWriteError
# Also:: Using $ErrorView = "CategoryView" is useful too.
function Get-Foo {
[CmdletBinding()]
param(
[string]$name,
[switch]$interrupt
)
Process... | 0 |
Reflection Module_3.ps1 | #requires -version 2.0
# ALSO REQUIRES Autoload for some functionality
# You should create a Reflection.psd1 with the contents: @{ RequiredModules = @("Autoload"); GUID="64b5f609-970f-4e65-b02f-93ccf3e60cbb"; ModuleVersion="3.5.0.0" }
#History:
# 1.0 - First public release (March 19, 2010)
# 2.0 - Private Build
... | 0 |
4020.ps1 |
function Test-AzureProvider
{
$defaultProviders = Get-AzResourceProvider
Assert-True { $defaultProviders.Length -gt 0 }
$allProviders = Get-AzResourceProvider -ListAvailable
Assert-True { $allProviders.Length -gt $defaultProviders.Length }
$ErrorActionPreference = "SilentlyContinue"
$... | 0 |
sample_30_28.ps1 | #
# Module manifest for module 'OCI.PSModules.Accessgovernancecp'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Accessgovernancecp.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Suppo... | 0 |
sample_15_26.ps1 | #Collect Event Logs for Slow Logon/ Slow Boot troubleshooter
$EventLogNames = "Setup"
Run-DiagExpression .\TS_GetEvents.ps1 -EventLogNames $EventLogNames -SectionDescription "Event Logs"
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorB... | 0 |
2123.ps1 |
Describe "Requires tests" -Tags "CI" {
Context "Parser error" {
$testcases = @(
@{command = "
@{command = "
@{command = "
@{command = "
@{command = "
@{command =... | 0 |
sample_0_92.ps1 | #************************************************
# TS_2K3PoolUsageMaximum.ps1
# Version 1.0.1
# Date: 5/8/2012
# Author: v-kaw
# Description: [Idea ID 2446] [Windows] Determining the trimming threshold set by the Memory Manager
# Rule number: 2446
# Rule URL: //sharepoint/sites/rules/Rule%20Submissions/Forms... | 0 |
sample_34_1.ps1 | <#
.Synopsis
Short description
.DESCRIPTION
Long description
.EXAMPLE
Example of how to use this cmdlet
.EXAMPLE
Another example of how to use this cmdlet
#>
function Stop-Process2 {
[CmdletBinding(SupportsShouldProcess = $true)]
[Alias()]
[OutputType([int])]
param(
# Param1 help description
... | 0 |
sample_6_94.ps1 | # Load Common Library
# Load Reporting Utilities
#_#$debug = $false
. ./utils_cts.ps1
. ./TS_RemoteSetup.ps1
# 2023-02-20 WalterE mod Trap #we#
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationIn... | 0 |
sample_55_56.ps1 | #
# Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll'
# Version number of this module.
ModuleVersion... | 0 |
sample_33_81.ps1 | @{
GUID = 'C46BE3DC-30A9-452F-A5FD-4BF9CA87A854'
Author="Microsoft Corporation"
CompanyName="Microsoft Corporation"
Copyright="Copyright (C) Microsoft Corporation. All rights reserved."
ModuleVersion = '1.0'
NestedModules = @( 'MSFT_MpComputerStatus.cdxml',
'MSFT_Mp... | 0 |
1109.ps1 |
$appPoolName = 'CarbonTestUninstallAppPool'
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Start-Test
{
Uninstall-IisAppPool -Name $appPoolName
Assert-False (Test-IisAppPool -Name $appPoolName)
}
function Stop-Test
{
Unins... | 0 |
3062.ps1 | function Set-TestInconclusive {
[CmdletBinding()]
param (
[string] $Message
)
if (!$script:HasAlreadyWarnedAboutDeprecation) {
Write-Warning 'DEPRECATED: Set-TestInconclusive was deprecated and will be removed in the future. Please update your scripts to use `Set-ItResult -Inconclu... | 0 |
sample_2_85.ps1 | #
# Module manifest for module 'OCI.PSModules.Lockbox'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Lockbox.dll'
# Version number of this module.
ModuleVersion = '93.0.0'
# Supported PSEditions
Compat... | 0 |
4211.ps1 | $psloadedrunas = $null
function Invoke-Runas {
param (
[Parameter(Mandatory = $True)]
[string]$User,
[Parameter(Mandatory = $True)]
[string]$Password,
[Parameter(Mandatory = $False)]
[string]$Domain=".",
[Parameter(Mandatory = $True)]
[string]$Comman... | 0 |
sample_27_0.ps1 | トピック
about_IntelEthernetCmdlets
概説
IntelEthernetCmdlets モジュールを使用して、サポートされている
インテル(R) イーサネット・デバイスの情報を入手したり、設定を構成したり、
問題をデバッグする方法について説明します。
説明
IntelEthernetCmdlets モジュールには、システム内のインテル(R)
イーサネット・デバイスの情報入手または設定の構成を可能にする
cmdlets が含まれています。ファームウェア・ログをサポートするデバイスでは、
問題のデバッグに役立つログ... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.