filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
sample_17_1.ps1
Param( [Parameter(Mandatory=$True,Position=0)] [string]$ScriptPath, [Parameter(Mandatory=$False)] [switch]$IsAdminPrivlegeRequired, [Parameter(Mandatory=$False)] [string]$Arguments="" ) Set-StrictMode -Version Latest $ErrorActionPreference = "Stop" # Event variable initialization Set-Variable...
0
1506.ps1
function Assert-LessThan { [CmdletBinding()] param( [Parameter(Position=0)] [object] $ExpectedValue, [Parameter(Position=1)] [object] $UpperBound, [Parameter(Position=2)] [string] $Message ...
0
sample_61_26.ps1
# # Module manifest for module 'OCI.PSModules.Dns' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Dns.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions CompatiblePSEd...
0
PowerShell Template_6.ps1
Function new-script { $strName = $env:username $date = get-date -format d $name = Read-Host "Filename" $email = Read-Host "eMail Address" $file = New-Item -type file "c:\\Scripts\\$name.ps1" -force add-content $file "#==========================================================================" add-content $file ...
0
get-netstat 1.2.ps1
$netstat = netstat -a -n -o | where-object { $_ -match "(UDP|TCP)" } [regex]$regexTCP = '(?<Protocol>\\S+)\\s+((?<LAddress>(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?)\\.(2[0-4]\\d|25[0-5]|[01]?\\d\\d?))|(?<LAddress>\\[?[0-9a-fA-f]{0,4}(\\:([0-9a-fA-f]{0,4})){1...
0
462.ps1
Set-PSFConfig -Module 'PSFramework' -Name 'Path.Temp' -Value $env:TEMP -Initialize -Validation 'string' -Description "Path pointing at the temp path. Used with Get-PSFPath." Set-PSFConfig -Module 'PSFramework' -Name 'Path.LocalAppData' -Value $script:path_LocalAppData -Initialize -Validation 'string' -Description "Path...
0
sample_66_77.ps1
<policyDefinitionResources revision="1.0" schemaVersion="1.0"> <displayName> </displayName> <description> </description> <resources> <stringTable> <string id="LAPS">LAPS</string> <string id="LAPS_BackupDirectory">Настройка каталога резервного копирования паролей</string> <string...
0
655.ps1
$reportPortalUri = if ($env:PesterPortalUrl -eq $null) { 'http://localhost/reports' } else { $env:PesterPortalUrl } $reportServerUri = if ($env:PesterServerUrl -eq $null) { 'http://localhost/reportserver' } else { $env:PesterServerUrl } function VerifyCatalogItemDoesNotExists() { param( [Parameter(Manda...
0
sample_38_16.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\update-browserslist-db@1.0.13_browserslist@4.22.3\node_modules\update-browserslist-db\node_modules;C:\Users\abder\c...
0
sample_46_28.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Join-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] [OutputType([System.Management.Automation.Language.IScriptExtent])] param( [Parameter(Value...
0
3557.ps1
$suffix="v2avm1" $JobQueryWaitTimeInSeconds = 0 $PrimaryFabricName = "V2A-W2K12-400" $PrimaryNetworkFriendlyName = "corp" $RecoveryNetworkFriendlyName = "corp" $NetworkMappingName = "corp96map" $RecoveryPlanName = "RPSwag96" + $suffix $policyName1 = "V2aTest" + $suffix $policyName2 = "V2aTest"+ $suffix...
0
sample_19_77.ps1
#************************************************ # DC_NfsClient-Component.ps1 # Version 1.0.06.26.14: Created script. # Version 1.1.08.14.14: Updated comments. TFS264083 # Date: 2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about NFS Client. # Called from: Main Networkin...
0
sample_2_52.ps1
ConvertFrom-StringData @' id_portusage=TCP Port Usage id_portusageobtaining=Obtaining TCP/IP port usage statistics id_ephemeralportdesc=More than %XXX% of ephemeral ports are currently in use which may cause a possible ephemeral port (outbound port) exhaustion. Please review the information collected to identify the...
0
Set Logfile length_2.ps1
################################################################################ # Set-FileLines.ps1 (V 1003) # This script will maintain the PS Transcript file (default setting), or any # text file, at a fixed length, ie matching the number of lines entered. # However, setting no lines will just remove any blank ...
0
3892.ps1
function Test-PoolCrud { $resourceGroup = Get-ResourceGroupName $accName = Get-ResourceName $poolName1 = Get-ResourceName $poolName2 = Get-ResourceName $resourceLocation = Get-ProviderLocation "Microsoft.NetApp" $poolSize = 4398046511104 $serviceLevel = "Premium" tr...
0
2512.ps1
$ColHeaders = ("SQLServer", "DBName", "addl_loan_data", "appraisal", "borrower", "br_address", "br_expense", "br_income", "br_liability", "br_REO", "channels", "codes", "customer_elements", "funding", "inst_channel_assoc", "institution", "institution_association", "loan_appl", "loan_fees", "loan...
0
sample_54_42.ps1
# # Module manifest for module 'OCI.PSModules.Resourcemanager' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Resourcemanager.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported P...
0
sample_24_55.ps1
function Connect-VirtuaNetworkSubnet { <# .SYNOPSIS Link Subnet .DESCRIPTION This script is used to Link the subnet to the Route Table .ROLE Administrators #> Param ( [Parameter(Mandatory = $True)] [ValidateNotNullOrEmpty()] [string] $uri, [Parameter(Mandatory = $true)] [V...
0
sample_34_36.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
sample_37_67.ps1
# # Module manifest for module 'OCI.PSModules.Generativeaiinference' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeaiinference.dll' # Version number of this module. ModuleVersion = '75.1.0' #...
0
3764.ps1
function Test-CreateIntegrationAccountSchema { $schemaFilePath = Join-Path (Join-Path $TestOutputRoot "Resources") "OrderFile.xsd" $schemaContent = [IO.File]::ReadAllText($schemaFilePath) $resourceGroup = TestSetup-CreateResourceGroup $integrationAccountName = "IA-" + (getAssetname) $integration...
0
sample_55_8.ps1
<# .NOTES =========================================================================== Created with: SAPIEN Technologies, Inc., PowerShell Studio 2021 v5.8.194 Created on: 10/19/2021 3:50 PM Created by: ksarens Updated 10/26/2102 fixing error in help information adding support for offline...
0
Twitbrain cheat.ps1
#Twitbrain Cheat PowerShell script #Description: PowerShell script to beat everyone at the Twitter twitbrain game # For more info follow @twitbrain at www.twitter.com #Change the Twitter Username and Password in the script. #Author: Stefan Stranger #Website: http://tinyurl.com/sstranger #Date: 03/07/2...
0
179.ps1
function Get-SCCMUserCollectionDeployment { [CmdletBinding()] PARAM ( [Parameter(Mandatory)] [Alias('SamAccountName')] $UserName, [Parameter(Mandatory)] $SiteCode, [Parameter(Mandatory)] $ComputerName, [Alias('RunAs')] [System.Mana...
0
Convert-ToCHexString_5.ps1
function Convert-ToCHexString { param ([String] $str) $ans = '' [System.Text.Encoding]::ASCII.GetBytes($str) | % { $ans += "0x{0:X2}, " -f $_ } return $ans.Trim(' ',',') }
0
3178.ps1
function Import-PSCredential { [cmdletbinding()] param ( [Alias("FullName")] [validatescript({ Test-Path -Path $_ })] [string]$Path = "credentials.$env:computername.xml", [string]$GlobalVariable ) $import = Import-Clixml -Path $Path -ErrorAction St...
0
sample_62_33.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
sample_45_64.ps1
param($installPath, $toolsPath, $package, $project) Import-Module (Join-Path $toolsPath common.psm1) -Force try { # Indicates if the current project is a VB project if ([string]::IsNullOrEmpty($project.CodeModel.Language)) { $IsVbProject = $project.FullName -like "*.vbproj" } else {...
0
1960.ps1
Describe "Out-String DRT Unit Tests" -Tags "CI" { It "check display of properties with names containing wildcard characters" { $results = new-object psobject | add-member -passthru noteproperty 'name with square brackets: [0]' 'myvalue' | out-string $results.Length | Should -BeGreaterThan 1 ...
0
sample_5_1.ps1
// Copyright (c) 2016 Dell Inc. or its subsidiaries. All Rights Reserved. // ================================================================== // DCIM_OpaqueManagementData // ================================================================== [dynamic, provider("dcismprovider"), Description( "DCI...
0
sample_53_20.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
sample_10_32.ps1
# # Module manifest for module 'OCI.PSModules.Redis' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Redis.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatible...
0
2474.ps1
function Save-AzrWebApp { [OutputType([System.IO.FileInfo])] [CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Name, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$TargetPath, [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [pscredential]$Cre...
0
sample_56_90.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 License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
Brushes.ps1
$frmMain_OnLoad= { $m_BrushSize = New-Object Drawing.Rectangle(0, 0, $picDemo.Width, $picDemo.Height) $wm = [Drawing.Drawing2D.WrapMode] $cboWraM.Items.AddRange(@($wm::Clamp, $wm::Tile, $wm::TileFlipX, $wm::TileFlipY, $wm::TileFlipXY)) $cboWraM.SelectedIndex = 0 [int]$maxHatchStyle = 53 for ($i ...
0
3995.ps1
$testAutomationAccount = @{ ResourceGroupName = 'anatolib-azureps-test-rg' AutomationAccountName = 'anatolib-azureps-test-aa' } $testGlobalModule = @{ Name = 'Azure' Version = '1.0.3' Size = 41338511 ActivityCount = 673 } $testNonGlobalModule = @{ Name = 'Pester' Version = '3.0.3' ContentLinkUri ...
0
sample_23_54.ps1
function Get-WACPCEflowSshParameters { <# .SYNOPSIS Gets the SSH parameters required to establish an SSH connection to an EFLOW device .DESCRIPTION This function retrieves the eflow user name, vm IP address and SSH private key from the EFLOW PS module .ROLE Administrators #> if (-Not (Get-Module -ListAva...
0
sample_16_43.ps1
# # Module manifest for module 'Microsoft.SME.DeviceManager' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.DeviceManager.psm1' # Version number of this module. ModuleVersion = '4.10.2' # Supported PSEditions # CompatiblePSEditions = @() # ID us...
0
1728.ps1
function New-ServiceNowQuery { [System.Diagnostics.CodeAnalysis.SuppressMessage('PSUseShouldProcessForStateChangingFunctions','')] [CmdletBinding()] [OutputType([System.String])] param( [parameter(mandatory=$false)] [string]$OrderBy='opened_at', [p...
0
Get-Parameter_16.ps1
function Get-Parameter { [OutputType('System.String')] [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)] [ValidateNotNullOrEmpty()] [String]$Command, [Parameter(Position=1)] [String[]]$Name=@('*'), [Parameter()] [Validate...
0
555.ps1
function Add-SPOSubsite { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$title, [Parameter(Mandatory=$false, Position=2)] [string]$webTemplate = "STS [Parameter(Mandatory=$false, Position=3)] [string]$description = "", [Parameter(Mandatory=$false, Positi...
0
3412.ps1
function Test-CreateNewAppServicePlan { $rgname = Get-ResourceGroupName $whpName = Get-WebHostPlanName $location = Get-Location $capacity = 2 $skuName = "S2" try { New-AzureRmResourceGroup -Name $rgname -Location $location $createResult = New-AzureRmAppServicePlan -ResourceGroupName ...
0
sample_34_5.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.ApplicationInsights.private.dll') # Get the private module's instance $instance = [Microsoft.Azure.PowerShell.Cmdlets.ApplicationInsights.Module]::Instance # Export nothing to c...
0
Convert-PowerPack2Ps_2.ps1
####################################################################### # Convert-PowerPack2Ps1 # # Converts PowerGUI .PowerPack files to ps1 PowerShell script library # v1 - raw conversion, no name changes, only script elements converted ###################################################################### # E...
0
3985.ps1
function ServiceBusRuleTests { $location = Get-Location $resourceGroupName = getAssetName "RGName-" $namespaceName = getAssetName "Namespace1-" $nameTopic = getAssetName "Topic-" $subName = getAssetName "Subscription-" $ruleName = getAssetName "Rule-" $ruleName1 = getAsse...
0
sample_1_69.ps1
ConvertFrom-StringData @' progressbar_id_crm_unsupportedcustomapp_exists=Custom Applications Under CRMAppPool Check progressbar_id_crm_unsupportedcustomapp_existsdesc=Creating an IIS application inside the Microsoft Dynamics CRM Website for any VDir and specifically within the ISV folder is not supported. '@ # SI...
0
sample_29_47.ps1
<# .SYNOPSIS Finds the repositories registered with PowerShellGet and registers them for PSResourceGet. #> function Import-PSGetRepository { [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] param( # Use the -Force switch to overwrite existing repositories. [switch...
0
1479.ps1
function Convert-HelpToHtml { param( [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string[]] $Name, [string] $DisplayName, [string[]] $Syntax, [string] $Modu...
0
sample_57_81.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
VMware Host Network Info.ps1
Connect-VIServer MYVISERVER $filename = "c:\\DetailedNetworkInfo.csv" Write "Gathering VMHost objects" $vmhosts = Get-VMHost | Sort Name | Where-Object {$_.State -eq "Connected"} | Get-View $MyCol = @() foreach ($vmhost in $vmhosts){ $ESXHost = $vmhost.Name Write "Collating information for $ESXHost" $network...
0
sample_42_29.ps1
# # Module manifest for module 'OCI.PSModules.Datascience' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datascience.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEdition...
0
Get-Characteristics.ps1
##############################################################################\n##\n## Get-Characteristics\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/guide)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nGet ...
0
sample_45_50.ps1
# # Module manifest for module 'OCI.PSModules.Identity' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Identity.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions Comp...
0
sample_39_15.ps1
# # Module manifest for module 'OCI.PSModules.Monitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Monitoring.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions ...
0
sample_0_19.ps1
@{ GUID = "A94C8C7E-9810-47C0-B8AF-65089C13A35A" Author = "PowerShell" CompanyName = "Microsoft Corporation" Copyright = "Copyright (c) Microsoft Corporation." ModuleVersion = "7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion = "3.0" FunctionsToExport = @() CmdletsToExport = "Get-Credential", "Get-ExecutionP...
0
sample_9_14.ps1
#************************************************ # DC_WINSClient-Component.ps1 # Version 1.0 # Date: 2009-2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about WINS Client. # Called from: Main Networking Diag #******************************************************* Trap...
0
sample_45_87.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
sample_0_41.ps1
ConvertFrom-StringData @' id_printcsrbloatingcheck_st=Possible client size rendering registry bloat detected '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCW...
0
Test-Prompt_1.ps1
$choices = [System.Management.Automation.Host.ChoiceDescription[]]( (New-Object System.Management.Automation.Host.ChoiceDescription "&Yes","Choose me!"), (New-Object System.Management.Automation.Host.ChoiceDescription "&No","Pick me!")) $Answer = $host.ui.PromptForChoice('Caption',"Message",$choices,(1)) Write-...
0
3619.ps1
function Test-SetGetListUpdateRemoveActivityLogAlert { Write-Output "Starting Test-AddActivityLogAlert" $resourceGroupName = 'Default-ActivityLogAlerts' $alertName = 'andy0307rule' $location = 'Global' try { Write-Verbose " ****** Creating a new LeafCondition object" $condition1 = New-A...
0
2725.ps1
$obj = "" | Select-Object $($PSVersionTable.Keys) foreach($item in $PSVersionTable.Keys) { $obj.$item = $($PSVersionTable[$item] -join ".") } $i = 1 Get-ChildItem -Force "$($env:windir)\Microsoft.Net\Framework" -Include mscorlib.dll -Recurse | ForEach-Object { $obj | Add-Member NoteProperty .NET_$i $_.Vers...
0
sample_66_25.ps1
# # Module manifest for module 'OCI.PSModules.Marketplacepublisher' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Marketplacepublisher.dll' # Version number of this module. ModuleVersion = '88.1.0' # S...
0
sample_2_54.ps1
#************************************************ # Version 1.0.0 # Date: 02-14-2012, 2021 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Runs Configuration Manager 2007 Diagnostics locally and/or remotely. # 0) Loads ConfigMgr Environment Information from Utils\utils_ConfigMgr07.ps1 # 1) Get...
0
2025.ps1
Describe "New-PSSessionOption parameters for non-Windows platforms" -Tag "CI" { BeforeAll { $originalDefaultParameterValues = $PSDefaultParameterValues.Clone() if ($IsWindows) { $PSDefaultParameterValues['it:skip'] = $true } } AfterAll { $global:PSDefau...
0
sample_67_48.ps1
\PrintAllTranslations प्रतिबंध का IgnoreTranslations प्रतिबंध के साथ उपयोग नहीं किया जा सकता.vआप परिकलित कालम '%{oii_column/}' को हाइब्रिड तालिका '%{oii_table/}' में नहीं जोड़ सकते. कृपया परिकलित कॉलम को निकालें.ˆआप हाइब्रिड तालिका '%{oii_table/}' में एकीकरण के लिए उपयोग किया गया 'alternateOf' कालम नहीं जोड़ सकते. कृप...
0
sample_12_71.ps1
ConvertFrom-StringData @' id_virtualization=Virtualization Information id_virtualizationobtaining=Obtaining Information about Virtualization Environment id_virtualizationoutput=Virtualization Information Output '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor ...
0
3978.ps1
function Test-ExpressRouteBGPServiceCommunities { $communities = Get-AzBgpServiceCommunity Assert-NotNull $communities $crmOnlineCommunity = $communities | Where-Object {$_.ServiceName -match "CRMOnline"} Assert-NotNull $crmOnlineCommunity.BgpCommunities Assert-AreEqual true $crmOnlineCommunity.Bgp...
0
sample_19_44.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
4345.ps1
function New-NuspecFile { [CmdletBinding()] Param( [Parameter(Mandatory = $true)] [string]$OutputPath, [Parameter(Mandatory = $true)] [string]$Id, [Parameter(Mandatory = $true)] [string]$Version, [Parameter(Mandatory = $true)] [string]$Descripti...
0
sample_2_42.ps1
# *********************************************************************************************************** # Version 1.0 # Date: 01-24-2014 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Collects data from SMS Provider # *****************************************************************************...
0
LNK file testing_1.ps1
param( $Path = (Split-Path $PSHOME -Qualifier) ) if($lnks -eq $null) { $lnks = ls $Path -Recurse -Filter "*.lnk" } $wsh = New-Object -ComObject WScript.Shell; foreach($lnk in $lnks) { $lnko = $wsh.CreateShortcut($lnk.fullname); $rtn = New-Object psobject -Property @{ "FilePath...
0
sample_54_46.ps1
# # Module manifest for module 'OCI.PSModules.Ospgateway' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Ospgateway.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions ...
0
sample_51_47.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. ##################################################################################################### # # Registers the WinRM endpoint for this instance of PowerShell. # # If the parameters '-PowerShellHome' were specified, it means that t...
0
2073.ps1
Describe "Json.NET LINQ Parsing" -tags "CI" { BeforeEach { $jsonFile = Join-Path -Path (Join-Path $PSScriptRoot -ChildPath assets) -ChildPath TestJson.json $jsonData = (Get-Content $jsonFile | Out-String) $json = [Newtonsoft.Json.Linq.JObject]::Parse($jsonData) } It "Should return data via Item()" ...
0
2320.ps1
function Show-BalloonTip { [OutputType([void])] [CmdletBinding(DefaultParameterSetName = 'IconFilePath')] param ( [Parameter(Mandatory,ParameterSetName = 'IconFilePath')] [ValidateNotNullOrEmpty()] [string]$IconFilePath, [Parameter(Mandatory,ParameterSetName = 'Icon')] [ValidateNotNullOrEmpty()] [Syste...
0
Get-Gender.ps1
function get-gender { param([string]$name) if($name.Length -lt 2) { throw "You need at least two letters in the name" } $name = "$($name[0])".ToUpper() + $name.SubString(1).ToLower() $page = get-web "http://www.babynameaddicts.com/cgi-bin/search.pl?gender=ALL;searchfield=Names;origins=ALL;search...
0
3811.ps1
function Test-DedicatedHost { $rgname = Get-ComputeTestResourceName try { [string]$loc = Get-ComputeVMLocation; $loc = $loc.Replace(' ', ''); New-AzResourceGroup -Name $rgname -Location $loc -Force; $hostGroupName = $rgname + 'hostgrou...
0
sample_26_54.ps1
# # Module manifest for module 'DscInstall' # # Generated by: Zia Jalali # # Generated on: 07/31/2017 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'Heartbeat.psm1' # Version number of this module. ModuleVersion = '1.1' # ID used to uniquely identify thi...
0
New-ISEMenu_3.ps1
Import-Module ShowUI Function New-ISEMenu { New-Grid -AllowDrop:$true -Name "ISEAddonCreator" -columns Auto, * -rows Auto,Auto,Auto,*,Auto,Auto -Margin 5 { New-Label -Name Warning -Foreground Red -FontWeight Bold -Column 1 ($target = New-TextBox -Name txtName -Column 1 -Row ($Row=1)) New-Label...
0
721.ps1
function New-RsSubscription { [cmdletbinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium', DefaultParameterSetName='FileShare')] param( [string] $ReportServerUri, [System.Management.Automation.PSCredential] $Credential, $Proxy, [Alias('R...
0
4175.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()][string] $DataFile, [string] $LogFile, [int] $ProcessDelay ) function Get-RelativePath { [CmdletBinding()][OutputType([string])] param () $Path = (split-path $SCRIPT:MyInvocation.MyCommand.Path -parent) + "\" Return $Path } function Import-DataFile {...
0
Get-Hostname_5.ps1
# .SYNOPSIS # Print the hostname of the system. # .DESCRIPTION # This function prints the hostname of the system. You can additionally output the DNS # domain or the FQDN by using the parameters as described below. # .PARAMETER Short # (Default) Print only the computername, i.e. the same value as returned by $env...
0
Get-CInfo.ps1
function Get-CInfo { param($Comp) Function PC-Name{ param ($compname) $ADS = Get-ADComputer -Filter {name -eq $compname} -Properties * | Select-Object -Property name If($ads -eq $null) {$false} ELSE{$True} } $ping = PC-Name $COMP if ($ping -eq $true) { Write-Host -ForegroundColor G...
0
sample_36_84.ps1
# # Module manifest for module 'OCI.PSModules.Cloudmigrations' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudmigrations.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported P...
0
sample_28_42.ps1
# # Module manifest for module 'OCI.PSModules.Oda' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oda.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_54_32.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" } $ret=0 if (Test-Path "$basedir/node$exe") { # Suppor...
0
sample_47_42.ps1
# # Module manifest for module 'OCI.PSModules.Analytics' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Analytics.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Co...
0
Function Run-Script_1.ps1
function Run-Script { if ($psISE.CurrentFile.DisplayName.StartsWith("Untitled")) { return } $script = $psISE.CurrentFile.DisplayName $psISE.CurrentFile.Save() $logfile = "$env:programfiles\\Sea Star Development\\" + "Script Monitor Service\\ScriptMon.txt" #Change t...
0
sample_64_9.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
sample_19_20.ps1
ConvertFrom-StringData @' id_bpastarting=Starting Best Practices Analyzer id_bparunning=Running Best Practices Analyzer id_bpagenerating=Generating BPA Output '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8...
0
2501.ps1
param( $SQLServer = 'PSQLDLS30' ) $SqlConnection = New-Object System.Data.SqlClient.SqlConnection $SqlCmd = New-Object System.Data.SqlClient.SqlCommand $SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter $DataSet = New-Object System.Data.DataSet $SqlConnection.ConnectionString = "Server=$SQLServer;Datab...
0
New-XVM_15.ps1
#EXAMPLES <# New-XVM -ComputerName CNSHHYPERVSVR02 -Name "WS2012-TESTSVR01" -SwitchName "External(192.168.1.0/24)" -VhdType NoVHD New-XVM -ComputerName CNSHHYPERVSVR02 -Name "WS2012-TESTSVR02" -SwitchName "External(192.168.1.0/24)" -VhdType ExistingVHD -VhdPath D:\\vhds\\WS2012-TESTSVR02.vhdx New-XVM -ComputerName ...
0
ConvertTo-Hex_11.ps1
# Ported from C# technique found here: http://forums.asp.net/p/1298956/2529558.aspx param ( [string]$SidString ) # Create SID .NET object using SID string provided $sid = New-Object system.Security.Principal.SecurityIdentifier $sidstring # Create a byte array of the proper length $sidBytes = New-Object byte[] ...
0
884.ps1
$rgname = "CustomRulesTest" $location = "East US" $appgwName = "WAFCustomRules" $resourceGroup = New-AzResourceGroup -Name $rgname -Location $location $sub1 = New-AzVirtualNetworkSubnetConfig -Name "appgwSubnet" -AddressPrefix "10.0.0.0/24" $sub2 = New-AzVirtualNetworkSubnetConfig -Name "backendSubnet" -AddressPre...
0
4013.ps1
workflow Test-WorkFlowWithVariousParameters { param([string] $a, [int] $b, [DateTime] $c) "a is " + $a "b is " + $b "c is " + $c }
0
1264.ps1
function Get-CMsmqMessageQueuePath { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true)] [string] $Name, [Switch] $Private ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCm...
0
3047.ps1
function Should-BeOfType($ActualValue, $ExpectedType, [switch] $Negate, [string]$Because) { if ($ExpectedType -is [string]) { $parsedType = ($ExpectedType -replace '^\[(.*)\]$', '$1') -as [Type] if ($null -eq $parsedType) { throw [ArgumentException]"Could not find type [$P...
0
Test-Host.ps1
function Test-Host { <# .Synopsis Test a host for connectivity using either WMI ping or TCP port .Description Allows you to test a host for connectivity before further processing .Parameter Server Name of the Server to Process. .Parameter ...
0
Exchange AutoReply Admin_1.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
Test-Hash.ps1
function Test-Hash { #.Synopsis # Test the HMAC hash(es) of a file #.Description # Takes the HMAC hash of a file using specified algorithm, and optionally, compare it to a baseline hash #.Example # C:\\PS>ls .\\Bin\\Release -recurse | Test-Hash -BasePath .\\Bin\\Release -Type SHA256 | Export-CSV ~\\Hashes....
0