filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
3685.ps1 |
function Test-AdlsGen2Crud
{
$resourceGroup = getAssetName
try
{
$AccountName = getAssetName
$ShareName = getAssetName
$DataSetName = getAssetName
$StorageAccountId = getAssetName
$FileSystemName = getAssetName
$createdFileSystemDataset = New-AzDataShareDataSet -ResourceGroupName $resourceGroup -A... | 0 |
Get User for Svc_Tasks.ps1 | #==========================================================================
# NAME: GetServiceAndTaskAccounts.ps1
#
# AUTHOR: Stephen Wheet
# Version: 2.0
# Date: 7/21/10
#
# COMMENT:
# This script was created to find out which any which services on any of
# the servers are running as domain accounts. It ... | 0 |
sample_37_49.ps1 | let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl();
let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/aspire.eventHandlers.js"];
let currentScriptElement = document.querySelector("script[src='Scripts/aspire.plugin.js']");
if (currentScriptElement !== null) {
scrip... | 0 |
323.ps1 | function Get-PSFMessageLevelModifier
{
[CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Get-PSFMessageLevelModifier')]
Param (
[string]
$Name = "*"
)
([PSFramework.Message.MessageHost]::MessageLevelModifiers.Values) | Where-Object Name -Like $Name
} | 0 |
sample_36_83.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 |
Watch-Process_1.ps1 | Function Watch-Process {
<#
.DESCRIPTION
Creates an event handler for monitoring either process creation or deletion. This requires to be run as administrator.
.SYNOPSIS
Watches for process creation or deletion.
.PARAMETER computerName
Name of the remote computer. Make sure you have privileges to acces... | 0 |
sample_12_68.ps1 | #************************************************
# TS_HPZ12ServiceCheck.ps1
# Version 1.0
# Date: 1-11-2011
# Author: v-anecho
# Description: Checks if 'Net Driver HPZ12' or 'Pml Driver HPZ12' is one of the installed services and startup type is something different than Disabled
#********************************... | 0 |
sample_4_45.ps1 | ConvertFrom-StringData @'
id_ctsdnsserver=DNS Server
id_ctsdnsserverdescription=Collects information about DNS Server.
'@
# SIG # Begin signature block
# MIIoOAYJKoZIhvcNAQcCoIIoKTCCKCUCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAI... | 0 |
Select-CSVString_2.ps1 | #
# NAME
# Select-CSVString
#
# SYNOPSIS
# Convert CSV files to custom objects with properties
#
# SYNTAX
# Select-CSVString -pattern <string[]> -files (ls *) [-StartDate <DateTime>] [-EndDate <DateTime>]
param ([regex]$pattern,$files=("$($exinstall)TransportRoles\\Logs\\AgentLog","$($exinstall.substri... | 0 |
powershell ise config_2.ps1 | <configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" />
<supportedRuntime version="v2.0" />
<process>
<rollForward enabled="false" />
</process>
</startup>
<runtime>
<loadFromRemoteSources enabled="true"/>
</run... | 0 |
sample_9_68.ps1 | #************************************************
# TS_DetectMTU1514.ps1
# Version 1.0
# Date: 02/06/2014
# Author: BBenson
# Description: Detect if LinkMTU is set to 1514.
# Rule number: 262751
# Rule ID: 7a316c95-272b-4207-983d-57acb91d0eea
# Rule URL: https://kse.microsoft.com/Contribute/Idea/1456f71b-f3... | 0 |
sample_21_30.ps1 | ConvertFrom-StringData @'
id_detectmtu1514_activity=Detect MTU of 1514
id_detectmtu1514_status=Checking network adapters for an MTU of 1514.
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# K... | 0 |
1757.ps1 |
Import-Module AzureRM.NetCore.Preview
Login-AzureRmAccount
$resourceGroupName = "PSAzDemo" + (New-Guid | ForEach-Object guid) -replace "-",""
$resourceGroupName
New-AzureRmResourceGroup -Name $resourceGroupName -Location "West US"
$dnsLabelPrefix = $resourceGroupName | ForEach-Object tolower
$... | 0 |
sample_31_44.ps1 | $rubydir = split-path $MyInvocation.MyCommand.Definition -parent
# Execute 'enable' and 'disable' in the context of the current powershell session, so that env vars are effective for subsequent commands.
if ($args[0] -eq "enable" -or $args[0] -eq "disable") {
$rubyfile = $rubydir + "/ruby"
$op = $args[0] + "ps1"
... | 0 |
sample_11_29.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\nanoid@3.3.7\node_modules\nanoid\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\nanoid@3.3.... | 0 |
1139.ps1 |
Set-StrictMode -Version 'Latest'
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
Describe 'Get-ServiceConfiguration' {
BeforeEach {
$Global:Error.Clear()
}
It 'should load all service configuration' {
Get-Service |
Wh... | 0 |
sample_5_88.ps1 | ConvertFrom-StringData @'
id_fltrfind=Machine Filter Drivers Information
id_fltrfindrunning=Gathering information about upper and lower filters installed (Fltrfind)
id_fltrfindoutput=Fltrfind Output
id_fltrfindoutputdesc=Upper and lower filters information
'@
# SIG # Begin signature block
# MIIoRgYJKoZIhvcNAQc... | 0 |
sample_56_21.ps1 | let pluginUrl = window.chrome.webview.hostObjects.sync.external.GetPluginUrl();
let scripts = [pluginUrl, "Scripts/common.eventHandlers.js", "Scripts/aspire.eventHandlers.js"];
let currentScriptElement = document.querySelector("script[src='Scripts/aspire.plugin.js']");
if (currentScriptElement !== null) {
scrip... | 0 |
sample_46_26.ps1 | #See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
#Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may n... | 0 |
sample_37_31.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 = '80.0.0'
# Supported PSEditions
... | 0 |
2057.ps1 |
Describe "Update-ModuleManifest tests" -tags "CI" {
BeforeEach {
$testModulePath = "testdrive:/module/test.psd1"
New-Item -ItemType Directory -Path testdrive:/module > $null
}
AfterEach {
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue testdrive:/module
}
It "... | 0 |
sample_40_17.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=Eine Umgebungsvariable mit diesem Namen und Typ ist bereits vorhanden.
EnvironmentErrorDoesNotExists=Eine Umgebungsvariable mit diesem Namen und Typ ist nicht vorhanden.
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQME... | 0 |
sample_65_58.ps1 | # Localized 05/01/2024 11:12 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1
# Culture = "en-US"
ConvertFrom-StringData @'
###PSLOC
PromptYesString=はい(&Y)
PromptNoString=いいえ(&N)
BundleFound=見つかったバンドル: {0}
PackageFound=パッケージが見つかりました: {0}
EncryptedBundleFound=暗号化されたバンドルが見つかりました: {0}
EncryptedPackageFound=暗号化されたパッ... | 0 |
sample_10_98.ps1 | ConvertFrom-StringData @'
id_dpm_eventlog_activity=Gathering Eventlogs
id_dpm_status_eventlogs=Running DC_DPMEventLogs.ps1
'@
# SIG # Begin signature block
# MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAI... | 0 |
sample_40_44.ps1 | /*!---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*----------------------------------------------------------*/
define(["require", "exports"], function (require, exports) {
/// <reference path="../../../Scripts/global.d.ts" />
/**
... | 0 |
sample_59_28.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 = '86.0.0'
# Supported PSEdition... | 0 |
3275.ps1 | enum SlackMessageType {
Normal
Error
Warning
}
class SlackMessage : Message {
[SlackMessageType]$MessageType = [SlackMessageType]::Normal
SlackMessage(
[string]$To,
[string]$From,
[string]$Body = [string]::Empty
) {
$this.To = $To
$this.From = $From
... | 0 |
sample_28_76.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... | 0 |
sample_11_79.ps1 | ConvertFrom-StringData @'
id_dirs=Collecting Directory Output
'@
# SIG # Begin signature block
# MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDRy8kiReDoGdLC
# nmSgV1SViLYbd... | 0 |
947.ps1 |
$uniqueId=$(-join ((97..122) + (48..57) | Get-Random -Count 10 | % {[char]$_}))
$apiVersion = "2015-04-08"
$location = "West US 2"
$resourceGroupName = "myResourceGroup"
$accountName = "mycosmosaccount-$uniqueId"
$accountResourceType = "Microsoft.DocumentDb/databaseAccounts"
$locations = @(
@{ "locationName"=... | 0 |
sample_57_42.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 = '83.3.0'
# Supported PSEditions
Compatible... | 0 |
Start-ComputerJobs_1.ps1 | #requires -version 2.0
function Start-ComputerJobs{
<#
.NOTES
Name: Start-ComputerJobs
Author: Tome Tanasovski
Created: 6/25/2010
Modified: 6/25/2010
Version: 1.1
Website: http://powertoe.wordpress.com
.SYNOPSIS
Multithreads a scriptblock with jobs
... | 0 |
Pipeline and Parameter_1.ps1 | param(
[Parameter(ValueFromPipeline=$true, Mandatory=$true, Position=0)]
[string[]]
$ComputerName
)
Process {
foreach ($cn in $ComputerName) {
Write-Host "Processing $cn"
}
}
| 0 |
sample_51_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 |
4161.ps1 |
Import-Module "D:\Program Files\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1"
function Get-Updates {
param ([String]$Architecture, [String]$OperatingSystem, [String]$Namespace, $Updates )
$Updates = @()
$Updates = Get-WmiObject -Class SMS_SoftwareUpdate -Namespace $Namespace
$Upd... | 0 |
sample_35_48.ps1 | $timestamp = get-date -uformat %Y%m%d-%k%M%S
$transcriptPath = "$($env:temp)\StorageSyncAgent-SetRegPIIAclSettings-$($timestamp).log"
Start-Transcript -Path $transcriptPath
# The following script removes read permissions from registry key locations which may contain PII information.
$regPaths = 'HKLM:\Software\Mi... | 0 |
Get-WebSite_3.ps1 | function Get-WebPage {
<#
.SYNOPSIS
Downloads web page from site.
.DESCRIPTION
Downloads web page from site and displays source code or displays total bytes of webpage downloaded
.PARAMETER Url
URL of the website to test access to.
.PARAMETER UseDefaultCredentials
Use the currently authentica... | 0 |
4104.ps1 |
cls
$Global:OS
Function GetOSArchitecture{
$Global:OS=Get-WMIObject win32_operatingsystem
}
$DisplayOutput = $false
GetOSArchitecture
[System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
[System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic') | Out-Null
$Output... | 0 |
464.ps1 |
Set-PSFConfig -Module PSFramework -Name 'System.Unattended' -Value $false -Initialize -Validation "bool" -Handler { [PSFramework.PSFCore.PSFCoreHost]::Unattended = $args[0] } -Description "Central setting, showing whether the current execution is unattended or not. This allows scripts/modules to react to whether there... | 0 |
Skip-Object_1.ps1 | function Skip-Object {
param(
[int]$First = 0, [int]$Last = 0, [int]$Every = 0, [int]$UpTo = 0,
[Parameter(Mandatory=$true,ValueFromPipeline=$true)]
$InputObject
)
begin {
if($Last) {
$Queue = new-object System.Collections.Queue $Last
}
$e = $every; $UpTo++; $u = 0
}
process {
... | 0 |
Get-PDC09Videos_2.ps1 | #requires -version 2.0
PARAM (
[Parameter(Position=1, Mandatory=$true)]
[ValidateSet("wmv","wmvhigh","ppt")] # the "mp4" files aren't there yet
[String]$MediaType,
[string]$Destination = $PWD
)
if( ([System.Environment]::OSVersion.Version.Major -gt 5) -and -not ( # Vista and ...
new-object Secur... | 0 |
sample_26_95.ps1 | #
# Module manifest for module 'OCI.PSModules.Servicemanagerproxy'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Servicemanagerproxy.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Sup... | 0 |
1559.ps1 | Set-Location -Path $env:SystemDrive\
Clear-Host
$Error.Clear()
Import-Module -Name posh-git -ErrorAction SilentlyContinue
if (-not($Error[0])) {
$DefaultTitle = $Host.UI.RawUI.WindowTitle
$GitPromptSettings.BeforeText = '('
$GitPromptSettings.BeforeForegroundColor = [ConsoleColor]::Cyan
$GitPromptSett... | 0 |
2945.ps1 | Framework '4.0x86'
task default -depends MsBuild
task MsBuild {
if ( $IsMacOS -OR $IsLinux ) {}
else {
exec { msbuild /version }
}
}
| 0 |
913.ps1 |
$sourceSubscriptionId='yourSourceSubscriptionId'
$sourceResourceGroupName='mySourceResourceGroupName'
$managedDiskName='myDiskName'
Select-AzSubscription -SubscriptionId $sourceSubscriptionId
$managedDisk= Get-AzDisk -ResourceGroupName $sourceResourceGroupName -DiskName $managedDiskName
$targetSubscriptionI... | 0 |
Open-ISEFile.ps1 | #Requires -Version 2.0
function Open-ISEFile {
<#
.NOTES
Name: Open-ISEFile
Author: Tome Tanasovski
Created: 6/20/2010
Version: 1.0
.SYNOPSIS
Open a new file in ISE
.DESCRIPTION
This cmdlet allows you to open a file in a new file tab w... | 0 |
2824.ps1 | function Send-GraphiteMetric
{
param
(
[CmdletBinding(DefaultParametersetName = 'Date Object')]
[parameter(Mandatory = $true)]
[string]$CarbonServer,
[parameter(Mandatory = $false)]
[ValidateRange(1, 65535)]
[int]$CarbonServerPort = 2003,
[parameter(Man... | 0 |
Compare Reg Keys.ps1 | <#
.SYNOPSIS
Compares Registry Key Properties and subkeys across multiple computers
.DESCRIPTION
The function Get-AllRegKey will recurse down from a given key, returning an array having
the key's properties, subkeys, and their properties and subkeys.
Provide Get-AllRegKey a list of computernames, and it wil... | 0 |
sample_60_79.ps1 | <#
.SYNOPSIS
This script checks for potential CFA issues in the logs from the resultOutputDir.
It looks for CFA detections and taint events in the logs and constructs a list of CFADetection objects.
It then adds some diagnotics messages and guidance for each process.
It also constructs a list of fi... | 0 |
Get-Password.ps1 | # ----------------------------------------------------------------------------------------------
# Get-Password PowerShell Script
#
# Author: John T Childers III
# Originally Written: 7/5/2011
# ***Important****
# Make sure to store this in a directory in that is a part of the path
# so that it you... | 0 |
sample_11_68.ps1 | PARAM ( [string] $SiteToCheck = $null )
#************************************************
# DCSiteInfo.ps1
# Version 1.0
# Date: 1/14/2014
# Author: Tim Springston [MS]
# Description: This script queries for the computers domain
# and returns details about all domain controllers which are in
# the same... | 0 |
sample_47_79.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_10_73.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\autoprefixer@10.4.17_postcss@8.4.33\node_modules\autoprefixer\bin\node_modules;C:\Users\abder\component-maker\web\n... | 0 |
4164.ps1 |
$Architecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture
$Architecture = $Architecture.OSArchitecture
if ($Architecture -eq "32-bit") {
if ((Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Reboot") -eq $false) {
New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion... | 0 |
3005.ps1 | Set-StrictMode -Version Latest
if ($PSVersionTable.PSVersion.Major -lt 6 -or $IsWindows) {
$tempPath = $env:TEMP
}
elseif ($IsMacOS) {
$tempPath = '/private/tmp'
}
else {
$tempPath = '/tmp'
}
Describe "Setup" {
It "returns a location that is in a temp area" {
$testDrivePath = (Get-Item $TestDr... | 0 |
85.ps1 |
function Get-AuthToken {
[cmdletbinding()]
param
(
[Parameter(Mandatory=$true)]
$User
)
$userUpn = New-Object "System.Net.Mail.MailAddress" -ArgumentList $User
$tenant = $userUpn.Host
Write-Host "Checking for AzureAD module..."
$AadModule = Get-Module -Name "AzureAD" -ListAvailable
if ($Aad... | 0 |
2676.ps1 | param(
[switch]$Force
)
. $PSScriptRoot/shared.ps1
$templateConfigurationsList = '/Lists/Templates'
$baseModulesLibrary = 'BaseModules'
$subModulesLibrary = 'AppsModules'
$timerIntervalMinutes = 30;
function GetUniqueUrlFromName($title) {
Connect -Url $tenantAdminUrl
$cleanName = $title -replace '[^a-z0-... | 0 |
sample_0_6.ps1 | ConvertFrom-StringData @'
progressbar_id_crm_fileversion_outdated=Checking For Outdated Microsoft CRM File Versions
progressbar_id_crm_fileversion_outdateddesc=Checking Microsoft CRM File Version Information To Ensure Recent Updates Are Installed
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBc... | 0 |
sample_61_4.ps1 | var OfficeaicopilotStrings={ChatContainerKeepItActionButtonText:"Conservar",ChatContainerUndoActionButtonText:"Desfacer",ChatContainerInsertActionButtonText:"Inserir",ChatContainerFeedbackNudgeContent:"Axúdanos a aprender e a adestrar os modelos marcando os resultados que xeren os LLM cun polgar cara arriba ou cara aba... | 0 |
sample_54_31.ps1 | Import-LocalizedData -BindingVariable lnTxt -FileName AzStackHci.ClusterWitness.Strings.psd1
function Test-WitnessFileShareWithCredential
{
[CmdletBinding()]
param (
[Parameter(Mandatory=$true, HelpMessage="Witness file share path.")]
[ValidateNotNullOrEmpty()]
[String]
... | 0 |
sample_56_31.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 |
2263.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed.")]
[ValidateNotNullOrEmpty()]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMess... | 0 |
88c1a7d6-0bf3-48db-bec5-4b21531648c5.ps1 | Function Get-DiskUsage {
<#
.SYNOPSIS
A tribute to the excellent Unix command DU.
.DESCRIPTION
This command will output the full path and the size of any object
and it's subobjects. Using just the Get-DiskUsage command without
any parameters will result in an output of the directory you are
currently p... | 0 |
Save-CurrentFile (ISE).ps1 | function Save-CurrentFile ($path)
{
$psISE.CurrentFile.SaveAs($path)
$psISE.CurrentFile.Save([Text.Encoding]::default)
}
# Save-CurrentFile '.\\Save-CurrentFile.ps1'
| 0 |
sample_35_96.ps1 | #
# Module manifest for module 'OCI.PSModules.Appmgmtcontrol'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Appmgmtcontrol.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSE... | 0 |
Powershell Only Outlook.ps1 | #connect to outlook
$GetOutlook = New-Object -com "Outlook.Application";
$olName = $GetOutlook.GetNamespace("MAPI")
$olxEmailFolder = $olName.GetDefaultFolder(‘olFolderInbox’)
$olxEmailFolder.Name
$olxEmailItem = $olxemailFolder.items
#show unread emails in inbox
$olxEmailItem | ?{$_.Unread -eq $True} | select ... | 0 |
2526.ps1 | [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | Out-Null;
$smoObj = [Microsoft.SqlServer.Management.Smo.SmoApplication];
function Run-Query()
{
param (
$SqlQuery,
$SqlServer,
$SqlCatalog
)
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection("Data Source=$SqlServer;... | 0 |
sample_32_94.ps1 | #
# Module manifest for module 'PowerShellEditorServices'
#
# Generated by: daviwil
#
# Generated on: 5/12/2016
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'PowerShellEditorServices.Commands.psm1'
# Version number of this module.
ModuleVersion = '0.2.0'
# I... | 0 |
1502.ps1 |
function Assert-Contains
{
[CmdletBinding()]
param(
[Parameter(Position=0)]
[object]
$Haystack,
[Parameter(Position=1)]
[object]
$Needle,
[Parameter(Position=2)]
[string]
$Message
)
... | 0 |
LoadModuleConfig_3.ps1 | ################################################################################
## Script Name: LoadModuleConfig
## Created On: 01/21/2010
## Author: Thell Fowler
## File: LoadModuleConfig.ps1
## Usage: Called from the NestedModules value from a module manifest.
## Version:... | 0 |
sample_20_48.ps1 | #
# Module manifest for module 'OCI.PSModules.Osmanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll'
# Version number of this module.
ModuleVersion = '77.0.0'
# Supported PSEditi... | 0 |
Alias latest msbuild.ps1 | ## Because of Split-Path, I get the "Framework" folder path (one level above the versioned folders)
$rtr = Split-Path $([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory())
## Then I loop through them in ascending (numerical, but really ascii) order
## each time I find installutil or mdbuild... | 0 |
sample_28_59.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 = '81.0.0'
# Supported PSEdition... | 0 |
where-in.ps1 | function where-in {
[cmdletbinding()]
param (
[parameter(mandatory = $true,position = 1)]
[system.Collections.IEnumerable]$collection,
[parameter(position = 2)]
[scriptblock]$predicate ,
[parameter(valuefrompipeline = $true)]
$pipelineobject
)
process {
if ($predicate) {
foreach ($__... | 0 |
2590.ps1 |
cls
$Errors.Clear;
$ENV = $args[0]
if ($ENV -eq $null){
$ENV = "PA-PROD"
}
switch ($ENV)
{
"PA-PROD"{ $DBServer = "XSQLUTIL18";
$ArchiveDrive = "E"
$DB = "Status";
$ServerQuery = "SELECT server_name
, domain
, ip_address
, dns_host_name
F... | 0 |
sample_64_46.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_31_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 = '83.1.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
1995.ps1 |
Describe "TabCompletion" -Tags CI {
BeforeAll {
$separator = [System.IO.Path]::DirectorySeparatorChar
}
It 'Should complete Command' {
$res = TabExpansion2 -inputScript 'Get-Com' -cursorColumn 'Get-Com'.Length
$res.CompletionMatches[0].CompletionText | Should -BeExactly 'Get-Comma... | 0 |
ciao.ps1 | ########################################################
# Created by Brian English
# Brian.English@charlottefl.com
# eddiephoenix@gmail.com
#
# for Charlotte County Government
# No warranty suggested or implied
########################################################
# Purpose: Cycle through all VMs on a... | 0 |
sample_0_72.ps1 | #
# Module manifest for module 'OCI.PSModules.Loganalytics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Loganalytics.dll'
# Version number of this module.
ModuleVersion = '92.1.0'
# Supported PSEditi... | 0 |
sample_1_77.ps1 | # To check organizations that are not updated on the CRM server.
#
# Rule to look for organizations that have not been updated to correct version.
#
# Created: 1/25/2012
# Author: Jonathan Randall
#******************************************************************************************************************
... | 0 |
sample_47_60.ps1 | <#
.SYNOPSIS
Deploys a Service Fabric application type to a cluster.
.DESCRIPTION
This script deploys a Service Fabric application type to a cluster. It is invoked by Visual Studio when deploying a Service Fabric Application project.
.NOTES
WARNING: This script file is invoked by Visual Studio. Its paramete... | 0 |
sample_62_39.ps1 | #
# Module manifest for module 'OCI.PSModules.Sch'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Sch.dll'
# Version number of this module.
ModuleVersion = '86.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
Get-Head.ps1 | function Get-Head {
#.Synopsis
# Read the first few characters of a file, fast.
param(
# The path to the file (no powershell parsing happens here)
[Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
[Alias("Path","PSPath")]
[String]$FilePath,
# The number of characte... | 0 |
1107.ps1 |
$Port = 9878
$SiteName = 'TestApplication'
$AppName = 'App'
$WebConfig = Join-Path $TestDir web.config
$AppPoolName = 'TestApplication'
function Start-TestFixture
{
& (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve)
}
function Start-Test
{
Uninstall-IisWebsite -Name $SiteNam... | 0 |
http___bestfreeipadgames.ps1 | A man is not old as long as he is seeking something. A man is not old until regrets take the place of dreams.
-----------------------------------
| 0 |
4006.ps1 |
$testReposInfo = @{
VsoGit = @{
Name = "AASourceControl-VsoGit"
RepoUrl = "https://francisco-gamino.visualstudio.com/_git/VsoGit-SwaggerAndCmdletsTests"
Branch = "preview"
FolderPath = "Azure/MyRunbooks"
SourceType = "VsoGit"
PersonalAccess... | 0 |
Patch-VMHost.ps1 | Add-PSSnapin "VMware.VimAutomation.Core"
Add-PSSnapIn "VMware.VumAutomation"
# Connect to vCenter
$VC = Connect-VIServer (Read-Host "Enter vCenter server")
$vumConfig = Get-VumConfig
$EsxHost = Get-Inventory -Name (Read-Host "Enter ESX Host")
$CriticalHost = Get-Baseline -Name "Critical Host Updates"
$NonCr... | 0 |
Test-64BitOS.ps1 | Add-Type -TypeDefinition @"
using System;
using System.Runtime.InteropServices;
public static class Win32Api
{
[DllImport("Kernel32.dll", EntryPoint = "IsWow64Process")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool IsWow64Process(
[In] IntPtr hProcess,
[Out, M... | 0 |
sample_6_7.ps1 | #************************************************
# DC_ProxyConfiguration.ps1
# Version 1.0: Proxy Configuration for IE User, WinHTTP, Firewall Client, PAC Files, Network Isolation
# Version 1.1: Added Proxy Configuration for IE System
# Version 1.2 (4/28/14): Edited table of contents.
# Create date: 12/5/2012
#... | 0 |
Find-DuplicateSMTP.ps1 | #######################################################################
#### Written By: Kevin Dunn ####
#### Date: 1/21/2009 ####
#### ####
#### FindDu... | 0 |
3265.ps1 |
class PluginCommand {
[Plugin]$Plugin
[Command]$Command
PluginCommand([Plugin]$Plugin, [Command]$Command) {
$this.Plugin = $Plugin
$this.Command = $Command
}
[string]ToString() {
return "$($this.Plugin.Name):$($this.Command.Name):$($this.Plugin.Version.ToString())"
}
}... | 0 |
sample_47_75.ps1 | # Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved.
Function Stop-AMTUserConsent {
<#
.Synopsis
Stops the Intel Active Management Technology user consent process
.Description
This CmdLet stops the user consent process on clients that have Intel Active Management Technology (AMT) fir... | 0 |
sample_33_76.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 = '81.0.0'
# S... | 0 |
sample_4_46.ps1 | # 2023-02-24 WalterE mod Trap #we#
$startTime_AutoAdd = Get-Date
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue
Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_"
}
Write-Host -Background... | 0 |
sample_53_86.ps1 | #
# Module manifest for module 'OCI.PSModules.Dataflow'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Dataflow.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEditions
Comp... | 0 |
1314.ps1 |
function Install-CService
{
[CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='NetworkServiceAccount')]
[OutputType([ServiceProcess.ServiceController])]
[Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSAvoidUsingUserNameAndPassWordParams","")]
param(
[Parameter(Mandat... | 0 |
3996.ps1 |
function Test-E2EVariableAsset
{
$resourceGroupName = "to-delete-01"
$automationAccountName = "fbs-aa-01"
$output = Get-AzAutomationAccount -ResourceGroupName $resourceGroupName -AutomationAccountName $automationAccountName -ErrorAction SilentlyContinue
$variableName = "CreateNewVariableW... | 0 |
sample_0_13.ps1 | [dynamic, provider("dcismprovider")]
class DCIM_Role : CIM_Role
{
[
Description ("CreationClassName indicates the name of the class or the subclass that is used in the creation of an instance. When used with the other key properties of this class, this property allows all instances of this class and... | 0 |
sample_4_95.ps1 | ConvertFrom-StringData @'
id_regsetupperfrecoverydebuginfo=Recovery/Debug related keys
id_regsetupperfistartupinfo=Startup information
id_regsetupperfilocalprintkey=Local Print Key
id_regsetupperfipolicies=Policies System
id_regsetupperfregtimezoneinfo=Time Zone keys
id_regsetupperfregts=Terminal Services
ID_Reg... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.