filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
4419.ps1 | function Save-Module {
[CmdletBinding(DefaultParameterSetName = 'NameAndPathParameterSet',
HelpUri = 'https://go.microsoft.com/fwlink/?LinkId=531351',
SupportsShouldProcess = $true)]
Param
(
[Parameter(Mandatory = $true,
ValueFromPipelineByPropertyName = $true,
... | 0 |
sample_56_14.ps1 | #
# Module manifest for module 'OCI.PSModules.Osubusage'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osubusage.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditions
Co... | 0 |
Custom Speech Commands_1.ps1 | #Filename commands.ps1
import-module "G:\\Documents\\Speech Macros\\custom.psm1"
import-module "G:\\Documents\\Speech Macros\\alice.psm1"
Add-SpeechCommands @{
"test command" = { Say $(Respond "3:2,4:0-2") }
" * the percentages * " = { Say $(Percentages) }
" * star date * " = { Say "Current,... | 0 |
sample_38_24.ps1 | function Invoke-RepoApi {
[CmdletBinding()]
param ()
process {
$token = $(az account get-access-token --resource 6befca88-4c28-430a-957e-f870b267bcfc --query accessToken)
$results = $Null
try {
$results = Invoke-RestMethod -Method Get -Uri "https://buildapi.docs.... | 0 |
Copy files .ps1 | cls
<#
Writer: Ritesh P.
#>
# Core Declaration
$date = ((get-date).toString('MM-dd-yyyy'))
$time = ((Get-Date).toString('HH-mm-ss'))
#$what = "/COPYALL /S /B"
#$options = "/R:0 /W:0 /FP"
$NewDestinationPath = '\\\\'+'infra'+'\\c$\\data1\\'+$date+'-'+$time #
When I add $time to create Destination f... | 0 |
sample_35_91.ps1 | #
# Module manifest for module 'OCI.PSModules'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
# RootModule = ''
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
CompatiblePSEditions = 'Core', 'Desktop'
# ID u... | 0 |
sample_57_38.ps1 | $url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise.msi';
if ([Environment]::Is64BitProcess) {
$url = 'https://dl.google.com/tag/s/dl/chrome/install/googlechromestandaloneenterprise64.msi'
}
$wc = New-Object net.webclient
$msiInstaller = "$env:temp\google-chrome.msi"
Write-Host ... | 0 |
sample_46_1.ps1 | #
# Module manifest for module 'Microsoft.Sdn.Acls'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.Sdn.Acls.psm1'
# Version number of this module.
ModuleVersion = '3.11.0'
# Supported PSEditions
# CompatiblePSEditions = @()
# ID used to uniquely ide... | 0 |
4280.ps1 |
Function Get-FireWallRule
{
Param (
$Name,
$Direction,
$Enabled,
$Protocol,
$profile,
$action,
$grouping
)
$Rules = (New-object -comObject HNetCfg.FwPolicy2).rules
If ($name) { $rules= $rules | where-object {$_.name -like $name}}
If ($direction) {$rules= $rules | where-object {$_.direction -eq $direction}}
If (... | 0 |
netcast show downloader.ps1 | cd M:\\Files\\Netcasts\\ShowName # switch to the diretory to store your content
Import-Module BitsTransfer # enable BITS on host machine as a file transfer method
$start=47 # start epidode number
$end=170 # end epidode number
$url="http://download.domain.com/episodes/" # URL of the download up to the ... | 0 |
sample_57_1.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 |
FTP upload_4.ps1 | @charset "utf-8";
/*
Credit: http://www.templatemo.com
*/
body {
margin: 0px;
padding: 0px;
color: #c2bead;
font-family: Tahoma, Geneva, sans-serif;
font-size: 12px;
line-height: 1.5em;
background-color: #2f2e28;
background-image: url(images/templatemo_body.jpg);
background-repeat: repeat-y;
... | 0 |
sample_12_96.ps1 | ConvertFrom-StringData @'
progressbar_id_crmassembliesdetectedingac=Searching Global Assembly Cache For Microsoft Dynamics CRM Assemblies
progressbar_id_crmassembliesdetectedingacdesc=Searching Global Assembly Cache For Microsoft Dynamics CRM Assemblies
'@
# SIG # Begin signature block
# MIIoLQYJKoZIhvcNAQcCoIIo... | 0 |
4121.ps1 |
[CmdletBinding()]
param
(
[string]$AppsFile = 'Applications.txt',
[ValidateNotNullOrEmpty()][string]$ConsoleTitle = 'Application Shortcuts',
[switch]$OutputToTextFile,
[switch]$GetApplicationList
)
function Add-AppToStartMenu {
[CmdletBinding()][OutputType([boolean])]
param
(
[Parameter(Mandatory = ... | 0 |
Ellipsis.ps1 | ## Usage: ls | ... FullName
################################################
${function:...} = { process { $_.$($args[0]) } }
| 0 |
Get-FSMORoleOwner.ps1 | Function Get-FSMORoleOwner {
<#
.SYNOPSIS
Retrieves the list of FSMO role owners of a forest and domain
.DESCRIPTION
Retrieves the list of FSMO role owners of a forest and domain
.NOTES
Name: Get-FSMORoleOwner
Author: Boe Prox
DateCreated: 06/9/2011
.EXAMPLE
... | 0 |
sample_31_70.ps1 | # Nushell Environment Config File
#
# version = "0.91.0"
def create_left_prompt [] {
let dir = match (do --ignore-shell-errors { $env.PWD | path relative-to $nu.home-path }) {
null => $env.PWD
'' => '~'
$relative_pwd => ([~ $relative_pwd] | path join)
}
let path_color = (if (is-adm... | 0 |
sample_15_33.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
function Get-ConditionalForwardingForVMs
{
... | 0 |
1608.ps1 |
function ydl {
param (
[string]$url = (Get-Clipboard),
[ValidateSet('audio', 'video')]
[string]$type = 'audio',
[switch]$u,
[string]$ydlpath = "$env:userprofile\Dropbox\Documents\PSScripts\youtube\youtube-dl.exe",
[ValidateSet('auto', 'best', 'worst')]
[stri... | 0 |
sample_9_79.ps1 | ConvertFrom-StringData @'
id_intersitemessagingstatecheck_st=Intersite Messaging service is stopped or disabled and this may cause problems related to (DFSN) site coverage calculations
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBg... | 0 |
POC-adding custom PS job_1.ps1 | #this is just a quite proof of concept, totally useless in of itself, with functions not fleshed out
function get-jobrepository
{
[CmdletBinding()]
param()
$pscmdlet.JobRepository
}
function add-job
{
[CmdletBinding()]
param($job)
$pscmdlet.JobRepository.add($job)
}
$src = @"
using System;
using Sy... | 0 |
2661.ps1 |
[CmdletBinding()]
Param (
[Parameter(Mandatory=$false)]
[ValidateSet('Install','Uninstall')]
[string]$DeploymentType = 'Install',
[Parameter(Mandatory=$false)]
[ValidateSet('Interactive','Silent','NonInteractive')]
[string]$DeployMode = 'Interactive',
[Parameter(Mandatory=$false)]
[switch]$AllowRebootPassThru ... | 0 |
sample_14_95.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 |
504.ps1 |
function Disable-UserAccessControl{
[CmdletBinding()]
param(
)
Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Value 00000000
if(Get-ItemProperty -Path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\pol... | 0 |
sample_10_51.ps1 | ConvertFrom-StringData @'
id_w32timeoutput=W32Time
id_w32timeobtaining=Gathering W32Time information
'@
# SIG # Begin signature block
# MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlA... | 0 |
sample_42_59.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmconfig'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmconfig.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported PSEditions
Co... | 0 |
sample_25_1.ps1 | #
# Module manifest for module 'OCI.PSModules.Apigateway'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apigateway.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
... | 0 |
sample_16_22.ps1 | ##----------------------------------------------------------------------------
## Copyright (c) Axis Communications AB, SWEDEN. All rights reserved.
##---------------------------------------------------------------------------
# Import shared functions and vars
. .\Commonalities.ps1
. .\StringConstants.ps1
Wr... | 0 |
sample_39_61.ps1 | # Copyright (C) Intel Corporation, 2021 All Rights Reserved.
function Invoke-DisableTLSAuthentication
{
<#
.Synopsis
Disables the TLS connection in AMT.
.Description
This cmdlet disables the TLS connection in AMT. (server or mutual)
.Notes
AMT Provisioning:
The vPro client AMT ... | 0 |
sample_37_51.ps1 | #
# Module manifest for module 'OCI.PSModules.Servicemesh'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicemesh.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEdition... | 0 |
sample_44_53.ps1 | #
# Module manifest for module 'OCI.PSModules.Ocvp'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Ocvp.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
CompatiblePS... | 0 |
Set-Computername_7.ps1 | function Set-ComputerName {
param( [switch]$help,
[string]$originalPCName=$(read-host "Please specify the current name of the computer"),
[string]$computerName=$(read-host "Please specify the new name of the computer"))
$usage = "set-ComputerName -originalPCname CurrentName -computername AnewName"
if (... | 0 |
sample_38_5.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 |
4236.ps1 |
$firewallName = ""
$serverPort = ""
function Invoke-DaisyChain {
param(
[Parameter(Mandatory=$true)][string]$port,
[Parameter(Mandatory=$true)][string]$daisyserver,
[Parameter(Mandatory=$true)][string]$c2server,
[Parameter(Mandatory=$true)][string]$c2port,
[Parameter(Mandatory=$true)][string]$URLs,
[Parameter(Manda... | 0 |
sample_0_59.ps1 | ConvertFrom-StringData @'
id_powercfg=Obtaining Power Manager Information
id_powercfgdesc=Running powercfg.exe to obtain power settings information
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JN... | 0 |
Get-UIInput.ps1 | function Get-UIInput {
#.Synopsis
# Prompt the user for input with a pretty dialog
#.Parameter PromptText
# The text to prompt the user for (an array of one or more strings)
#.Example
# Get-UIInput "First Name:", "Last Name:", "Age:"
Param([string[]]$PromptText = "Ple... | 0 |
1086.ps1 |
& (Join-Path -Path $PSScriptRoot 'Initialize-CarbonTest.ps1' -Resolve)
Describe 'Get-FirewallRule.when getting all rules' {
It 'should get firewall rules' {
[Carbon.Firewall.Rule[]]$rules = Get-FirewallRule
$rules | Should -Not -BeNullOrEmpty
$expectedCount = netsh advf... | 0 |
sample_19_24.ps1 | #************************************************
# TS_ClusterCAUWMINamespaceCheck.ps1
# Version 1.0.1
# Date: 1/16/2013
# Author: v-kaw
# Description: [Idea ID 6519] [Windows] Invalid Class error on 2012 Clusters (SDP)
# Rule number: 6519
# Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispF... | 0 |
352.ps1 | function Get-PSFFeature
{
[CmdletBinding()]
param (
[string]
$Name = "*"
)
process
{
[PSFramework.Feature.FeatureHost]::Features.Values | Where-Object Name -Like $Name
}
} | 0 |
sample_50_9.ps1 | param(
# Folder access path for mounted drive.
[string]
[parameter(Mandatory=$true)]
$AccessPath,
# When a folder is this percent full cleanup will be initiated.
[int]
[Parameter(Mandatory=$true)]
$CleanupThresholdPercent,
# When cleanup occurs files will be pruned unt... | 0 |
sample_49_41.ps1 | #
# Module manifest for module 'OCI.PSModules.Artifacts'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Artifacts.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditions
Co... | 0 |
ASPX Mailbox (5 of 6).ps1 | <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MailboxTaskResults.aspx.cs" Inherits="MailboxTaskResults" %>
<%@ Reference Page="~/MailboxConfirm.aspx" %>
<%@ PreviousPageType VirtualPath="~/MailboxConfirm.aspx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DT... | 0 |
sample_26_75.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 = '80.0.0'
# Supported PSEdition... | 0 |
4295.ps1 |
function SuiteSetup {
Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue
Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue
$script:IsWindowsOS = (-not (Get-Variable -Name IsWindows -ErrorAction Ignore)) -or $IsWindows
$script:ProgramFilesScrip... | 0 |
sample_61_5.ps1 | #
# Module manifest for module 'OCI.PSModules.Osmanagementhub'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osmanagementhub.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported P... | 0 |
2949.ps1 | properties {
$x = $null
$y = $null
$z = $null
}
task default -depends TestRequiredVariables
task TestRequiredVariables `
-description "This task shows how to make a variable required to run task. Run this script with -properties @{x = 1; y = 2; z = 3}" `
-requiredVariables x, y, z `
{
}
| 0 |
571.ps1 |
function Add-SPONoteFieldtoList
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string] $listTitle,
[Parameter(Mandatory=$true, Position=2)]
[string] $fieldName
)
$newField = "<Field Type='Note' DisplayName='$fieldName' Name='$fieldName' required='FALSE' NumLines='6' RichTe... | 0 |
1319.ps1 |
function Test-CUser
{
[CmdletBinding()]
param(
[Parameter(Mandatory=$true)]
[ValidateLength(1,20)]
[string]
$Username
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$user = Get... | 0 |
1602.ps1 |
function Get-SKU {
param (
[object]$comps = $env:COMPUTERNAME
)
foreach ($computer in $comps) {
try {
[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$computer).OpenSubKey('HARDWARE\DESCRIPTION\System\BIOS').GetValue('SystemSku')... | 0 |
Select-Alive_1.ps1 | ## this filer passes through only objects that are pingable
## it takes any object as input, but the property containing the hostname
## to ping must be specified if the object is not a string
function Select-Alive {param( [object]$InputObject,
[string]$Property,
[int32]$Requests = 3,
[switch]$Verbose... | 0 |
sample_19_76.ps1 | @{
GUID="c61d6278-02a3-4618-ae37-a524d40a7f44 "
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
ModuleToProcess="PSDiagnostics.psm1"
Func... | 0 |
3401.ps1 |
function Test-SingleNetworkInterface
{
$rgname = Get-ComputeTestResourceName
try
{
$loc = Get-ComputeVMLocation;
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;
$vmsize = 'Standard_A2';
$vmname = 'vm' + $rgname;
... | 0 |
sample_64_49.ps1 | param([string] $AgentInstallDir)
#Get the agent updater module path using intallation directory details
$AgentInstallDir=$AgentInstallDir.Trim()
$AgentUpdaterModulePath=Join-Path -Path $AgentInstallDir -ChildPath "Kailani.Afs.Updater.Cmdlets.dll"
Write-Host "Running the agent updater action from $AgentUpdaterModu... | 0 |
sample_10_74.ps1 | ConvertFrom-StringData @'
id_clusterdependencyreport=Cluster resource dependency report
id_clusterdependencyreportdesc1=Obtaining cluster resource dependency report
id_clusterdependencyreportdesc=Obtaining cluster resource dependency report from group %GroupName%
'@
# SIG # Begin signature block
# MIIoUgYJKoZIh... | 0 |
sample_43_96.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 = '74.1.0'
# Supported PSEditions
... | 0 |
sample_14_71.ps1 | #************************************************
# DC_NgenCollect.ps1
# Version 1.0
# Date: 2009-2019
# Author: Walter Eder (waltere@microsoft.com)
# Description: Collects .Net Framework nGen files
# Called from: TS_AutoAddCommands_Apps.ps1
#*******************************************************
Trap [Excep... | 0 |
Install-Module.ps1 | function Install-Module {
[CmdletBinding()]
Param(
[Parameter(ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true,Mandatory=$true)]
[Alias("PSPath")]
[String]$ModuleFilePath
, [Switch]$Global
)
## Get the Full Path of the module file
$ModuleFilePath = Resolve-Path $ModuleFilePat... | 0 |
sample_60_61.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 = '83.3.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
2646.ps1 | Configuration SQLServer{
param([string[]] $ComputerName)
Import-DscResource -Module cSQLResources
Node $ComputerName {
File DataDir{
DestinationPath = 'C:\DBFiles\Data'
Type = 'Directory'
Ensure = 'Present'
}
File LogDir{
Destinatio... | 0 |
3413.ps1 |
function Test-GetWebAppSlot
{
$rgname = Get-ResourceGroupName
$appname = Get-WebsiteName
$slotname1 = "staging"
$slotname2 = "testing"
$location = Get-Location
$planName = Get-WebHostPlanName
$tier = "Standard"
$apiversion = "2015-08-01"
$resourceType = "Microsoft.Web/sites"
try
{
New-... | 0 |
sample_2_16.ps1 | ConvertFrom-StringData @'
id_ctsdhcpclient=DHCP Client
id_ctsdhcpclientdescription=Collects information about DHCP Client.
'@
# SIG # Begin signature block
# MIIoPAYJKoZIhvcNAQcCoIIoLTCCKCkCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAI... | 0 |
sample_27_25.ps1 | #
# Module manifest for module 'OCI.PSModules.Resourcesearch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Resourcesearch.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSE... | 0 |
sample_38_54.ps1 | /*!---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*----------------------------------------------------------*/
define(["require", "exports", "Providers/CloudExplorer/Resources/CloudExplorerResources"], function (require, exports, CloudExplorer... | 0 |
sample_14_21.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 |
897.ps1 | $webappname="mywebapp$(Get-Random -Minimum 100000 -Maximum 999999)"
$storagename="$($webappname)storage"
$container="appbackup"
$location="West Europe"
New-AzResourceGroup -Name myResourceGroup -Location $location
$storage = New-AzStorageAccount -ResourceGroupName myResourceGroup `
-Name $storagename -SkuName Stand... | 0 |
sample_65_7.ps1 | function Write-InstallationCheckToFile
{
Param($installationchecks)
if (Get-Module AzureRM.Profile -ListAvailable -ErrorAction Ignore)
{
Write-Warning ("Both Az and AzureRM modules were detected on this machine. Az and AzureRM modules cannot be imported in the same session or used in the same s... | 0 |
sample_38_10.ps1 | #
# Script module for module 'Az.MachineLearning' that is executed when 'Az.MachineLearning' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 05/16/2024 06:33:08
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try... | 0 |
2790.ps1 |
if (Get-Command logparser.exe) {
$lpquery = @"
SELECT
COUNT(Protocol,
LocalAddress,
ForeignAddress,
State,
ConPId,
Component,
Process) as ct,
Protocol,
LocalAddress,
ForeignAddress,
State,
ConPid,
Componen... | 0 |
sample_15_31.ps1 | ConvertFrom-StringData @'
id_wga=Collecting MGADiag
id_wgastatus=Running MGADiag.exe
'@
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQcCoIIoNzCCKDMCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCBtMYXMG... | 0 |
sample_37_32.ps1 | param(
# Folder access path for observability drive
[string]
[parameter(Mandatory=$true)]
$AccessPath,
# Name of subfolder config file to read
[string]
[Parameter(Mandatory=$true)]
$SubFolderConfigFileName
)
$observabilityNugetPath = "$PSScriptRoot\..\.."
Import-Module "$o... | 0 |
sample_11_97.ps1 | trap [Exception]
{
WriteTo-ErrorDebugReport -ErrorRecord $_
continue
}
If (!$Is_SiteServer) {
TraceOut "ConfigMgr Site Server not detected. This script gathers data only from a Site Server. Exiting."
exit 0
}
TraceOut "Started"
Import-LocalizedData -BindingVariable ScriptStrings
$sectiondescription... | 0 |
1540.ps1 | function Expand-MrZipFile {
[CmdletBinding()]
param (
[Parameter(Mandatory=$true,
ValueFromPipeline=$true)]
[ValidateScript({
If ((Test-Path -Path $_ -PathType Leaf) -and ($_ -like "*.zip")) {
$true
}
else {
... | 0 |
sample_60_1.ps1 | # Initialize variables if they aren't already defined.
# These may be defined as parameters of the importing script, or set after importing this script.
# CI mode - set to true on CI server for PR validation build or official build.
[bool]$ci = if (Test-Path variable:ci) { $ci } else { $false }
# Build configuration.... | 0 |
sample_14_82.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 |
2059.ps1 |
Import-Module HelpersCommon
Describe "Enable-ExperimentalFeature and Disable-ExperimentalFeature tests" -tags "Feature","RequireAdminOnWindows" {
BeforeAll {
$systemConfigPath = "$PSHOME/powershell.config.json"
if ($IsWindows) {
$userConfigPath = "~/Documents/powershell/powershell.c... | 0 |
sample_23_20.ps1 | # Setting all environment variables for the venv
let path-name = (if ((sys).host.name == "Windows") { "Path" } { "PATH" })
let virtual-env = "C:\D_SAVE\Projects\Pyduino\env"
let bin = "Scripts"
let path-sep = ";"
let old-path = ($nu.path | str collect ($path-sep))
let venv-path = ([$virtual-env $bin] | path join)
let... | 0 |
937.ps1 |
$apiVersion = "2015-04-08"
$resourceGroupName = "myResourceGroup"
$accountName = "mycosmosaccount"
$databaseName = "database1"
$databaseThroughputResourceName = $accountName + "/gremlin/" + $databaseName + "/throughput"
$databaseThroughputResourceType = "Microsoft.DocumentDb/databaseAccounts/apis/databases/settings"
$... | 0 |
sample_13_64.ps1 | $UserErrorActionPreference = $ErrorActionPreference
$ErrorActionPreference = "Stop"
function SseResponseHelper {
param(
[Parameter(Mandatory, ValueFromPipeline)]
[System.IO.Stream] $Stream
)
process {
$StreamReader = New-Object System.IO.StreamReader($Stream)
$Template='da... | 0 |
1940.ps1 |
Describe "Json Tests" -Tags "Feature" {
BeforeAll {
function ValidateSampleObject
{
param ($result, [switch]$hasEmbeddedSampleObject )
Write-Verbose "validating deserialized SampleObject" -Verbose
$result.SampleInt | Should -Be 98765
$resu... | 0 |
2184.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, ParameterSetName="Multiple", HelpMessage="Site server where the SMS Provider is installed")]
[parameter(ParameterSetName="Single")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[ValidateNotNullOrEmpt... | 0 |
sample_36_75.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 = '82.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
Out-Balloon_3.ps1 | <#
.Synopsis
Makes a baloon tip in the notification area
.Description
With just a few arguments, it is easy to make some text appear in a little balloon.
You can specify an icon file (*.ico) with the -icon argument, if you don't then
the first icon of the host is used.
out-balloo... | 0 |
sample_37_35.ps1 | #
# Module manifest for module 'OCI.PSModules.Integration'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Integration.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEdition... | 0 |
3933.ps1 |
function Test-VirtualNetworkTapCRUDUsingIpConfig
{
$rgname = Get-ResourceGroupName
$vnetName = Get-ResourceName
$subnetName = Get-ResourceName
$publicIpName = Get-ResourceName
$nicName = Get-ResourceName
$domainNameLabel = Get-ResourceName
$rglocation = Get-Pro... | 0 |
df.ps1 | function df ( $Path ) {
if ( !$Path ) { $Path = (Get-Location -PSProvider FileSystem).ProviderPath }
$Drive = (Get-Item $Path).Root -replace "\\\\"
$Output = Get-WmiObject -Query "select freespace from win32_logicaldisk where deviceid = `'$drive`'"
Write-Output "$($Output.FreeSpace / 1mb) MB"
}
| 0 |
sample_35_44.ps1 | ;!@Lang2@!UTF-8!
; 4.07 : Dinamiteru
;
;
;
;
;
;
;
;
;
;
0
7-Zip
Asturian
Asturianu
401
Val
Torgar
&Si
&Non
&Zarrar
Axuda
&Siguir
440
Si a &Too
Non a T&oo
Parar
Reentamar
&De fondu
&En primer planu
&Posar
Posao
¿Tas fixu que quies paralo?
500
F&icheru
&Remanar
&Ver
F&avoritos
&Ferramientes
A&xuda
540
&Abrir
Abrir ... | 0 |
Get-Parameter 2.6.ps1 | #Requires -version 2.0
#.Synopsis
# Enumerates the parameters of one or more commands
#.Notes
# With many thanks to Hal Rottenberg, Oisin Grehan and Shay Levy
# Version 0.80 - April 2008 - By Hal Rottenberg http://poshcode.org/186
# Version 0.81 - May 2008 - By Hal Rottenberg http://poshcode.org/255
# Ver... | 0 |
Beginner event 10 _2.ps1 | #
# Summer 2009 Scripting games
# Beginner Event 10 - The 1,500-Meter race
# http://blogs.technet.com/heyscriptingguy/archive/2009/06/18/hey-scripting-guy-2009-scripting-games-event-10-details-beginner-and-advanced-1-500-meter-race.aspx
#
# ToDo: In this event, you must write a script that will count down from th... | 0 |
sample_6_5.ps1 | ConvertFrom-StringData @'
id_rdsserverprogress=Gathering RDS Information:
id_rdsls=Getting License Server configuration.
id_rdslssenetworklogonright=Check if SeNetworkLogonRight is preventing network connectivity to License server
id_rdslssenetworklogonrightsolution=Please make sure that the RDS servers can 'access... | 0 |
sample_29_60.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 |
1645.ps1 | $a1 = New-Object System.Collections.ArrayList
$a2 = New-Object System.Collections.ArrayList
$a3 = New-Object System.Collections.ArrayList
$a4 = New-Object System.Collections.ArrayList
$a5 = New-Object System.Collections.ArrayList
$a6 = New-Object System.Collections.ArrayList
$a7 = New-Object System.Collections.ArrayLis... | 0 |
2868.ps1 | task default -depends MSBuildWithError
task MSBuildWithError {
if ( $IsMacOS -OR $IsLinux ) {}
else {
msbuild ThisFileDoesNotExist.sln
}
}
| 0 |
Write-DataTable_4.ps1 | #######################
<#
.SYNOPSIS
Writes data only to SQL Server tables.
.DESCRIPTION
Writes data only to SQL Server tables. However, the data source is not limited to SQL Server; any data source can be used, as long as the data can be loaded to a DataTable instance or read with a IDataReader instance.
.INPUTS... | 0 |
sample_23_57.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_64_60.ps1 | #
# Script module for module 'Az.Synapse' that is executed when 'Az.Synapse' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 07/04/2024 08:22:41
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
... | 0 |
1600.ps1 |
function Get-PdfText
{
[CmdletBinding()]
[OutputType([string])]
param (
[Parameter(Mandatory = $true)]
[string]
$Path
)
$Path = $PSCmdlet.GetUnresolvedProviderPathFromPSPath($Path)
try
{
$reader = New-Object iTextSharp.text.pdf.pdfreader -ArgumentList $P... | 0 |
sample_38_37.ps1 | #
# Module manifest for module 'OCI.PSModules.Autoscaling'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Autoscaling.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEdition... | 0 |
sample_22_20.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\jiti@1.21.0\node_modules\jiti\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\jiti@1.21.0\no... | 0 |
sample_49_86.ps1 | #
# Module manifest for module 'OCI.PSModules.Database'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Database.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Supported PSEditions
Comp... | 0 |
sample_18_99.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.