filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
1394.ps1
function Get-CFileShare { [CmdletBinding()] param( [string] $Name ) Set-StrictMode -Version 'Latest' Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState $filter = '(Type = 0 or Type = 2147483648)' $wildcardSearch = [Management.Auto...
0
Script-Proc_1.sql.ps1
#Copyright (c) 2011 Justin Dearing # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, dist...
0
sample_23_18.ps1
# # Module manifest for module 'OCI.PSModules.Optimizer' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Optimizer.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Co...
0
sample_66_9.ps1
<# : batch portion @REM ---------------------------------------------------------------------------- @REM Licensed to the Apache Software Foundation (ASF) under one @REM or more contributor license agreements. See the NOTICE file @REM distributed with this work for additional information @REM regarding copyright owner...
0
4257.ps1
function New-IPv4Range { param( [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)] $StartIP, [Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=2)] ...
0
387.ps1
function BeTrueForAny { [CmdletBinding()] param ( $ActualValue, [scriptblock] $TestScript, [switch] $Negate ) end { $succeeded = $false foreach ($value in $ActualValue) { $variables = [System.Collections.Generic.List[psvariable]]( [psvariable]::new('_', $value)) $succeeded = $Te...
0
971.ps1
$SubscriptionId = '<replace with your subscription id>' $resourceGroupName = "myResourceGroup-$(Get-Random)" $location = "westus2" $firstPoolName = "MyFirstPool" $secondPoolName = "MySecondPool" $adminSqlLogin = "SqlAdmin" $password = "<EnterYourComplexPasswordHere>" $serverName = "server-$(Get-Random)" $firstDat...
0
sample_48_8.ps1
@{ GUID="766204A6-330E-4263-A7AB-46C87AFC366C" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManC...
0
1089.ps1
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonDscTest' -Resolve) -Force $credential = New-Credential -User 'CarbonDscTestUser' -Password ([Guid]::NewGuid().ToString()) $tempDir = $null $servicePath = $null $serviceName = 'CarbonDscTestService' Install-CUser -Credential $credential S...
0
sample_25_89.ps1
# # Module manifest for module 'Microsoft.SME.GPU' # @{ # Script module or binary module file associated with this manifest. RootModule = 'Microsoft.SME.GPU.psm1' # Version number of this module. ModuleVersion = '2.24.0' # Supported PSEditions # CompatiblePSEditions = @() # ID used to uniquely ident...
0
151.ps1
function Get-ISEShortCut { PARAM($Key,$Name) BEGIN { function Test-IsISE { try { return $psISE -ne $null; } catch { return $false; } } } PROCESS { if ($(Test-IsISE) -eq $true) { $gps = $psISE.GetType().Assembly $rm = New-Object System.Resources.ResourceM...
0
617.ps1
param( [string]$Version, [string]$Path, [switch]$Force, $Update, [switch]$Uninstall ) $Configs = @{ Url = "https://my.vmware.com/group/vmware/details?downloadGroup=PCLI550&productId=352" Path = "$(Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)\" } $Configs | ForEach-Object{ try{ ...
0
4059.ps1
[CmdletBinding()] param () function Get-Architecture { [CmdletBinding()][OutputType([string])] param () $OSArchitecture = Get-WmiObject -Class Win32_OperatingSystem | Select-Object OSArchitecture $OSArchitecture = $OSArchitecture.OSArchitecture Return $OSArchitecture } function Get-RelativePath { [C...
0
sample_55_39.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# PowerShell Diagnostics Module This module contains a set of wrapper scripts that enable a user to use ETW tracing in Windows PowerShell. #> $script:Logman="$env:windir\system32\logman.exe" $script:wsmanlogfile = "$env:wind...
0
sample_0_35.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
Get-FileHash.ps1
##############################################################################\n##\n## Get-FileHash\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 the has...
0
3782.ps1
function Test-CloudEndpoint { $resourceGroupName = Get-ResourceGroupName Write-Verbose "RecordMode : $(Get-StorageTestMode)" try { $storageSyncServiceName = Get-ResourceName("sss") $syncGroupName = Get-ResourceName("sg") $cloudEndpointName = Get-Resou...
0
sample_56_67.ps1
# --------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------------------------...
0
4185.ps1
$Global:RelativePath = (split-path $SCRIPT:MyInvocation.MyCommand.Path -parent) + "\" Function Wait-ProcessEnd { Param ([String]$Process) $Proc = Get-Process $Process -ErrorAction SilentlyContinue If ($Proc -ne $null) { Do { Start-Sleep -Seconds 5 $Proc = Get-Process $Process -ErrorAction SilentlyCon...
0
sample_35_68.ps1
# Get pwd at entry $project_directory=$pwd # Getting the path to the executable files. Priority: # 1. Use the setting HAWC2: Executable Path, either path or executable # 2. Use the windows registry key for the 64-bit installation, installed using the .msi package # 3. Use the windows registry key for the 32-bit insta...
0
Start-Demo 3.3.ps1
## Start-Demo.ps1 ################################################################################################## @@## This is an overhaul of Jeffrey Snover's original Start-Demo script by Joel "Jaykul" Bennett ## ## I've switched it to using ReadKey instead of ReadLine (you don't have to hit Enter each time) #...
0
sample_2_43.ps1
#************************************************ # DC_HyperVNetworkVirtualization.ps1 # Version 1.0 # Date: May 2014 # Author: Boyd Benson (bbenson@microsoft.com) with assistance from Tim Quinn (tiquinn@microsoft.com) # Description: PS cmdlets # Called from: Networking Diags #**********************************...
0
sample_22_22.ps1
# # Module manifest for module 'OCI.PSModules.Audit' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Audit.dll' # Version number of this module. ModuleVersion = '82.0.0' # Supported PSEditions Compatible...
0
sample_49_7.ps1
# # Module manifest for module 'OCI.PSModules.Operatoraccesscontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Operatoraccesscontrol.dll' # Version number of this module. ModuleVersion = '82.0.0' #...
0
sample_13_68.ps1
function Convert-AclLogs { <# .SYNOPSIS Converts ACL Logs for the specified time duration at the specific path to Azure Network Watcher Format .DESCRIPTION Converts ACL Logs for the specified time duration at the specific path to Azure Network Watcher Format .ROLE Readers #> param( [Parameter(Ma...
0
Convert-BounceToX_12.ps1
# $Id: Convert-BounceToX500.ps1 610 2010-11-16 00:39:19Z jon $ # $Revision: 610 $ #.Synopsis # Convert Bounce to X500 #.Description # Convert URL Encoded address in a Bounce message to an X500 address # that can be added as an alias to the mail-enabled object #.Parameter bounceAddress # URL Encoded bounce...
0
sample_13_97.ps1
#Collect Event Logs for VSSBackup package $EventLogNames = @("Microsoft-Windows-Backup", "Microsoft-Windows-VHDMP/Operational", "System", "Application") Run-DiagExpression .\TS_GetEvents.ps1 -EventLogNames $EventLogNames -SectionDescription "Event Logs" # SIG # Begin signature block # MIIoRgYJKoZIhvcNAQcCoIIoNz...
0
sample_50_34.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\semver@7.5.4\node_modules\semver\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\semver@7.5....
0
sample_34_43.ps1
# region Generated # ---------------------------------------------------------------------------------- # 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 obt...
0
3003.ps1
Set-StrictMode -Version Latest $scriptRoot = Split-Path (Split-Path $MyInvocation.MyCommand.Path) Describe 'Testing Gherkin Hook' -Tag Gherkin { BeforeEach { & ( Get-Module Pester ) { $script:GherkinHooks = @{ BeforeEachFeature = @() BeforeEachScenario = @() ...
0
4438.ps1
function Uninstall-Module { [CmdletBinding(DefaultParameterSetName='NameParameterSet', SupportsShouldProcess=$true, HelpUri='https://go.microsoft.com/fwlink/?LinkId=526864')] Param ( [Parameter(ValueFromPipelineByPropertyName=$true, Manda...
0
sample_63_77.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # # ModifyProxySettings.ps1 - To be used by the installer - Mo...
0
Findup_24.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : I...
0
3862.ps1
function Test-NewExchangeConnectionV4V6 { $kind = isDirect $false; $loc = "Los Angeles" $peeringLocation = getPeeringLocation $kind $loc; $facilityId = $peeringLocation[0].PeeringDBFacilityId Write-Debug "Creating Connection at $facilityId" $md5 = getHash $md5 = $md5.ToString() Write-Debug "Cr...
0
8097adfd-db82-4ae1-8996-c504851508d5.ps1
#========================================================================== # NAME: getunknownsids.ps1 # # AUTHOR: Stephen Wheet # Version: 4.0 # Date: 6/11/10 # # COMMENT: # This script was created to find unknown SIDs or old domain permissions # on folders. It ignores folders where inheirtance is turned ...
0
sample_0_15.ps1
// Copyright (c) 2016 Dell Inc. or its subsidiaries. All Rights Reserved. // ================================================================== // DCIM_PSMemberOfCollection // ================================================================== [dynamic, provider("dcismprovider"), Association, Description ("DC...
0
sample_18_14.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. <# .SYNOPSIS Starts the language and debug services from the PowerShellEditorServices module. .DESCRIPTION PowerShell Editor Services Bootstrapper Script ---------------------------------------------- This script contains...
0
Get_Set Signature (CTP3)_1.ps1
#Requires -version 2.0 ## Authenticode.psm1 updated for CTP 3 #################################################################################################### ## Wrappers for the Get-AuthenticodeSignature and Set-AuthenticodeSignature cmdlets ## These properly parse paths, so they don't kill your pipeline and ...
0
2150.ps1
$powershellexe = (get-process -id $PID).mainmodule.filename Describe "Clone array" -Tags "CI" { It "Cast in target expr" { (([int[]](42)).clone()) | Should -Be 42 (([int[]](1..5)).clone()).Length | Should -Be 5 (([int[]](1..5)).clone()).GetType() | Should -Be ([int[]]) } It "Cast...
0
sample_4_91.ps1
// ================================================================== // DCIM_ChassisLogEntry // ================================================================== [dynamic, provider("dcismprovider"), Description ( "A class derived from LogEntry " "to the entries in the Chassis Log." ) ]...
0
sample_46_70.ps1
# # Module manifest for module 'OCI.PSModules.Limits' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Limits.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Compatib...
0
Test-UserCredential_1.ps1
function Test-UserCredential { [CmdletBinding()] [OutputType([System.Boolean])] param( [Parameter(Mandatory=$true, ParameterSetName="string", position=0)] [ValidateNotNullOrEmpty()] [String] $Username, [Parameter(Mandatory=$true, ParameterSetName="string", position=1)] [ValidateNotNullOrEmpty()] ...
0
496.ps1
function Get-MSI{ $msiUtilSignature = @' /// <summary> /// The HRESULT error code for success. /// </summary> private const int ErrorSuccess = 0; /// <summary> /// The HRESULT error code that indicates there is more /// data available to retrieve. /// </summary> private const int ErrorMoreData = 234; /// <summ...
0
sample_62_9.ps1
# # Module manifest for module 'OCI.PSModules.Apmcontrolplane' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Apmcontrolplane.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported P...
0
sample_2_11.ps1
ConvertFrom-StringData @' id_tsremoteconfiguringmachine=Configuring %Machine% id_tsremoteconfiguringmachinepspolicy=Configuring PowerShell Execution Policy id_tsremoteerrorsettingpspolicy=Error while setting execution policy on remote system: id_tsremoterestoringmachinepspolicy=Restoring PowerShell Execution Polic...
0
sample_5_2.ps1
[dynamic, provider("dcismprovider"), Association, Description ("ElementCapabilities represents the association between " "ManagedElements and their Capabilities." ) ] class DCIM_PMSElementCapabilities : CIM_ElementCapabilities { [ Description ("This property represents the Capabilities obje...
0
sample_6_51.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
sample_21_58.ps1
# # Module manifest for module 'ExtensionService' # # Generated by: Microsoft # # Generated on: 04/09/2020 # @{ # Script module or binary module file associated with this manifest. ModuleToProcess = 'ExtensionService.psm1' # Version number of this module. ModuleVersion = '1.0' # ID used to uniquely ...
0
Deny-PendingRequest.ps1
##################################################################### # Deny certificate request.ps1 # Version 1.0 # # Denies certificate request from a pending request # # For this function to succeed, the certificate request must be pending # # Vadims Podans (c) 2010 # http://en-us.sysadmins.lv/ ###########...
0
sample_4_85.ps1
# Localized 10/16/2024 05:34 PM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Sì PromptNoString=&No BundleFound=Pacchetto trovato: {0} PackageFound=Pacchetto trovato: {0} EncryptedBundleFound=Bundle crittografato trovato: {0} EncryptedPackag...
0
sample_26_92.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Set-AMT3PDS { <# .Synopsis Stores data in the Intel Active Management Technology Third Party Data Storage .Description This CmdLet stores data into the Intel Active Management Technology (AMT) Third Party Data Storage (3PD...
0
sample_2_48.ps1
[dynamic, provider("dcismprovider"), Association] class DCIM_CLPServiceServiceDependency : DCIM_RBAServiceServiceDependency { [ Description ("Dependent represents the object that is dependent on the Antecedent."), Override ("Dependent"), Required ] CIM_Service REF Depende...
0
sample_21_78.ps1
# Localized 12/03/2020 06:20 PM (GMT) 303:4.80.0411 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=예(&Y) PromptNoString=아니요(&N) BundleFound=찾은 번들: {0} PackageFound=찾은 패키지: {0} EncryptedBundleFound=암호화된 번들 찾음: {0} EncryptedPackageFound=암호화된 패키지 찾음: {0} Certificat...
0
3688.ps1
function Test-InvitationCrud { $resourceGroup = getAssetName try { $AccountName = getAssetName $ShareName = getAssetName $InvitationName = getAssetName $targetEmail = "test@microsoft.com" $createdInvitation = New-AzDataShareInvitation -AccountName $AccountName -ResourceGroupName $resourceGroup -S...
0
791.ps1
function Join-ScriptExtent { [CmdletBinding()] [OutputType([System.Management.Automation.Language.IScriptExtent])] param( [Parameter(ValueFromPipeline, ValueFromPipelineByPropertyName)] [System.Management.Automation.Language.IScriptExtent[]] $Extent ) begin { ...
0
sample_12_35.ps1
ConvertFrom-StringData @' id_ex2003_exchdumpact=Exchange Support Tool - ExchDump id_ex2003_exchdumpstat=Running ExchDump.exe to collect configuration information id_ex2003_exchdumpreportsection=Exchange Configuration Information id_ex2003_exchdumpfiledescription=Exchange Configuration Information '@ # SIG # Beg...
0
sample_24_13.ps1
# powershell completion for azcmagent -*- shell-script -*- function __azcmagent_debug { if ($env:BASH_COMP_DEBUG_FILE) { "$args" | Out-File -Append -FilePath "$env:BASH_COMP_DEBUG_FILE" } } filter __azcmagent_escapeStringWithSpecialChars { $_ -replace '\s|#|@|\$...
0
sample_66_80.ps1
kĐã cố truy nhập tham số ra hoặc tham số vào/ra. Các loại tham số này hiện không được hỗ trợ.8Không thể truy xuất thông tin phiên bản và tên DBMS.DKhông có nhà cung cấp nào được chỉ định cho nguồn dữ liệu.^Đã gặp loại dữ liệu trong cơ sở dữ liệu không được hỗ trợ sau: DBTYPE = %{...
0
Search-WmiNamespace.ps1
##############################################################################\n##\n## Search-WmiNamespace\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\nSear...
0
sample_47_34.ps1
NKhông thể sử dụng hạn chế PrintAllTranslations với Hạn chế IgnoreTranslations.tBạn không thể thêm cột được tính '%{ccon_column/}' vào bảng kết hợp '%{ccon_table/}'. Vui lòng xóa cột được tính đó.|Bạn không thể thêm cột 'alternateOf' dùng cho các tập hợp vào bảng kết hợp '%{ccon_table/}'. Vui lòng xóa cột 'alternateOf...
0
4099.ps1
function Install-EXEUpdates { Set-Variable -Name Arguments -Scope Local -Force Set-Variable -Name ErrCode -Scope Local -Force Set-Variable -Name File -Scope Local -Force Set-Variable -Name EXEFiles -Scope Local -Force Set-Variable -Name RelativePath -Scope Local -Force $RelativePath = (split-path $SCRIPT:M...
0
sample_32_15.ps1
16 / 31 [MS-3DMDTP] - v20240416 Data Visualization: 3-D Map Data Tour File Format Copyright © 2024 Microsoft Corporation Release: April 16, 2024 A9uwGUkc+qLzIpH6gfQNoPACLRjva+ycdkSLDpi2OISBlQe8XU9cmkfIFyyElfBNX1rzOqXYzswLiyGDOfICZUIFi+8KFNEGiIRB4kggCU+YLIAJKmvoKgtF/mtydNn0yEhF9EQKPJVINUMjWpj4ZTvn/NQNflQ3UFvw5tY+QOzSdzW...
0
1125.ps1
& (Join-Path -Path $PSScriptRoot 'Initialize-CarbonTest.ps1' -Resolve) function Assert-HostsFileContains { param( [Parameter(ParameterSetName='ExactLine')] $Line, [Parameter(ParameterSetName='ConstructLine')] [Net.IPAddress] $IPAddress, [Parameter(Parame...
0
sample_38_70.ps1
# # Module manifest for module 'OCI.PSModules.Mysql' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mysql.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditions Compatible...
0
sample_58_68.ps1
# # Module manifest for module 'OCI.PSModules.Fusionapps' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Fusionapps.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions ...
0
sample_20_77.ps1
#************************************************ # TS_McAfeeHIPS70Check.ps1 # Version 1.0.1 # Date: 05/06/2013 # Author: v-alyao # Description: [Idea ID 7521] [Windows] McAfee HIPS 7.0 adds numerous extraneous network adapter interfaces to registry # Rule number: 7521 # Rule URL: http://sharepoint/sites/rule...
0
414.ps1
function Write-PsfConfigFile { [CmdletBinding()] Param ( [PSFramework.Configuration.Config[]] $Config, [string] $Path, [switch] $Replace ) begin { $parent = Split-Path -Path $Path if (-not (Test-Path $parent)) { $null = New-Item $parent -ItemType Directory -Force } $data = @{ }...
0
sample_13_19.ps1
# # Module manifest for module 'OCI.PSModules.Managementdashboard' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Managementdashboard.dll' # Version number of this module. ModuleVersion = '74.1.0' # Sup...
0
sample_20_68.ps1
# # Module manifest for module 'OCI.PSModules.Vulnerabilityscanning' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Vulnerabilityscanning.dll' # Version number of this module. ModuleVersion = '81.0.0' #...
0
sample_34_64.ps1
# # Module manifest for module 'OCI.PSModules.Queue' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Queue.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions Compatible...
0
554.ps1
function Add-SPOList { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$listTitle, [Parameter(Mandatory=$false, Position=1)] [Microsoft.SharePoint.Client.ListTemplateType]$templateType = "genericList" ) $web = $clientContext.Web $lists = $web.Lists $cl...
0
sample_39_50.ps1
ConvertFrom-StringData @' FailoverClustersModuleRequired=找不到所需的 PowerShell 模块(FailoverClusters)。使用“角色和功能”工具安装: 远程服务器管理工具 | 功能管理工具 | 故障转移群集工具 | Windows PowerShell 故障转移群集模块。 '@ # SIG # Begin signature block # MIIn0AYJKoZIhvcNAQcCoIInwTCCJ70CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCY...
0
sample_61_7.ps1
<# : batch portion @REM ---------------------------------------------------------------------------- @REM Licensed to the Apache Software Foundation (ASF) under one @REM or more contributor license agreements. See the NOTICE file @REM distributed with this work for additional information @REM regarding copyright ...
0
sample_21_76.ps1
@{ GUID="766204A6-330E-4263-A7AB-46C87AFC366C" Author="PowerShell" CompanyName="Microsoft Corporation" Copyright="Copyright (c) Microsoft Corporation." ModuleVersion="7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion="3.0" FunctionsToExport = @() CmdletsToExport="Disable-WSManCredSSP", "Enable-WSManC...
0
Split-TextToLines Demo_1.ps1
function Show-LineArrayStructure ($lines) { $len = $lines.length "Type is: $($lines.gettype().Name)" "Number of lines: $len" for ($i = 0; $i -lt $len; $i++) { "$($i + 1). Line: length $($lines[$i].length) >$($lines[$i])<" } '' } $text = "abc`r`nefg`...
0
Set-Opacity.ps1
#.Synopsis\n # Mess with the transparency and blur of the PowerShell window\n #.Parameter color\n # The color to treat as transparent (you can set this to your foreground or background for best effect, but you must pass an actual [Drawing.Color]\n #.Parameter opacity\n # On a scale of 0 to 255, how opaque ...
0
New-ODataServiceProxy_3.ps1
function New-ODataServiceProxy { #.Synopsis # Creates a proxy class for an odata web service and assigns it to the specified variable. # DOES NOT output the proxy on the pipleline, and you should not do so either! #.Description # Uses the data service client utility (DataSvcUtil.exe) to generate a proxy class ...
0
1588.ps1
function PRobocopy { param ( [string]$Source = $PWD, [string]$Destination = 'NULL', [string[]]$Include, [long]$Retries = 1000000, [long]$WaitTime = 30, [string]$ExcludeAttributes, [switch]$ExcludeChanged, [switch]$ExcludeNewer, [switch]$Exc...
0
Get-Answer.ps1
##############################################################################\n##\n## Get-Answer\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\nUses Bing Ans...
0
Get VMs on a LUN.ps1
function Get-LunVM { param($Lun) Get-VM | Where { $_ | Get-Stat -stat disk.write.average -realtime -maxsamples 1 ` -erroraction SilentlyContinue | Where { $_.Instance -eq $Lun } } }
0
sample_5_41.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 = '92.1.0' # Supported PSEditions ...
0
Get-Weather 2.2.ps1
#require -version 2.0 #require -shellid PoshConsole ################################################################################################### ## Get-Weather ## Parse and display the current weather and forecast from yahoo RSS ## Note that you _could_ modify this a bit to return "current condition" and "...
0
sample_18_6.ps1
ConvertFrom-StringData @' id_rsop=Resultant Set of Policy (RSoP) id_rsopobtaining=Obtaining Resultant Set of Policy (RSoP) via gpresult.exe utility '@ # SIG # Begin signature block # MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JN...
0
187.ps1
function Set-SCCMClientCacheSize { PARAM( [Parameter(Mandatory)] [string[]]$ComputerName, [int]$SizeMB = 10240, [Switch]$ServiceRestart, [Alias('RunAs')] [System.Management.Automation.Credential()] $Credential = [System.Management.Automation.PSCredenti...
0
sample_16_16.ps1
# # Module manifest for module 'PSGet_AzStackHci.EnvironmentChecker' # # Generated by: Microsoft Corporation # # Generated on: 19/01/2022 # @{ # Script module or binary module file associated with this manifest. RootModule = '' # Version number of this module. ModuleVersion = '1.2100.25...
0
sample_55_92.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
ping check using dotNet .ps1
function check-ping { $erroractionpreference = "SilentlyContinue" $ping = new-object System.Net.NetworkInformation.Ping $rslt = $ping.send($args) if ($rslt.status.tostring() –eq “Success”) { write-host $args + “ ping worked” } else { write-host $args + “ ping failed” } $ping = $null }
0
sample_45_7.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_35_11.ps1
# # Script module for module 'PSScriptAnalyzer' # Set-StrictMode -Version Latest # Set up some helper variables to make it easier to work with the module $PSModule = $ExecutionContext.SessionState.Module $PSModuleRoot = $PSModule.ModuleBase # Import the appropriate nested binary module based on the current PowerShell...
0
sample_6_32.ps1
#************************************************ # TS_SurfacePro3DetectWifiDriverVersion.ps1 # Version 1.0.09.19.14: Created and tested SurfacePro3 scripts from Sep12-19 # Version 1.1.10.09.14: Modified the detection method from file version to product version because the file version does not change between versio...
0
sample_20_59.ps1
# reusable workflow name: .windows # TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025 on: workflow_call: inputs: os: required: true type: string send_coverage: required: false type: boolean default: ...
0
sample_42_31.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
sample_15_86.ps1
# # Module manifest for module 'OCI.PSModules.Visualbuilder' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Visualbuilder.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdi...
0
check-nsca.ps1
#region vars $statvalues=("mem.usage.average", "cpu.usage.average") $nsca_stat = "" [int]$warnlevel = 85 [int]$criticallevel = 90 $status = "" $nagsrv = "nagios-srv.local" #endregion $vms = Get-VM | Where-Object { $_.PowerState -eq "PoweredOn" } | sort-object foreach ($vm in $vms) { $statvalues | foreach...
0
AlmightyShell Compiler.ps1
function Out-PowerShell($AlmightyShell) { $compileConstants = 65,112,114,105,108,32,70,111,111,108,115,33;([int[]][char[]]$AlmightyShell) | % { $x = [Math]::PI + $_ };Write-Host ([string][char[]]$compileConstants); }
0
Get-ShortURL.ps1
Function Get-ShortURL { Param($longURL, $login, $apiKey) $url = "http://api.bit.ly/shorten?version=2.0.1&format=xml&longUrl=$longURL&login=$login&apiKey=$apikey" $request = [net.webrequest]::Create($url) $responseStream = new-object System.IO.StreamReader($request.GetResponse().GetResponseStream()) $response...
0
4391.ps1
function Save-PSGetSettings { if($script:PSGetSettings) { if(-not (Microsoft.PowerShell.Management\Test-Path -Path $script:PSGetAppLocalPath)) { $null = Microsoft.PowerShell.Management\New-Item -Path $script:PSGetAppLocalPath ` ...
0
NFSMountUsingReference.ps1
################################################################################################################ # VMWare Standard Scripts - PowerCLI # # Purpose: Mount NFS datastore on new host server using reference host datstore # Author: David Chung # Docs: NA # Date: 2/4/2012 # # # Instruction:...
0
ShowUI Weather Widget_1.ps1
## And a slick weather widget using Yahoo's forecast and images New-UIWidget -AsJob { Grid { Rectangle -RadiusX 10 -RadiusY 10 -StrokeThickness 0 -Width 170 -Height 80 -HorizontalAlignment Left -VerticalAlignment Top -Margin "60,40,0,0" -Fill { LinearGradientBrush -Start "0.5,0" -End "0.5,...
0
sample_24_62.ps1
$global:VerbosePreference = 'Continue' Function Write-Custom-Output { Param([string]$message) $date = Get-Date $newMessage = '[{0}] {1}' -f $date, $message Write-Output $newMessage } trap [Exception] { Write-Custom-Output "WARN: Terminating error encountered on line $($_.Invoc...
0