filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_39_92.ps1 | ConvertFrom-StringData @'
EnvironmentErrorAlreadyExists=Proměnná prostředí s tímto názvem a typem už existuje.
EnvironmentErrorDoesNotExists=Proměnná prostředí s tímto názvem a typem neexistuje.
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGs... | 0 |
Get-HPAgentVersion.ps1 | #######################
<#
.SYNOPSIS
Gets HP PSP/SPP Agent Version
.DESCRIPTION
The Get-HPAgentVersion function gets the HP PSP/SPP version.
.EXAMPLE
Get-HPAgentVersion "Z002"
This command gets information for computername Z002.
.EXAMPLE
Get-Content ./servers.txt | Get-HPAgentVersion
This command gets inform... | 0 |
1379.ps1 |
function Uninstall-CFileShare
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$Name
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
$errors = @{... | 0 |
Test-ADCredentials.ps1 | Function Test-ADCredentials {
Param($username, $password, $domain)
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain
$pc = New-Object System.DirectoryServices.AccountManagement.PrincipalContext($ct, $domain)
New-Object PSOb... | 0 |
871.ps1 | function Start-PigJob {
$ErrorActionPreference = "Stop"
$context = Get-AzContext
if ($context -eq $null)
{
Connect-AzAccount
}
$context
$clusterName = Read-Host -Prompt "Enter the HDInsight cluster name"
$creds=Get-Credential -Message "Enter the login for th... | 0 |
Test-Server_1.ps1 | Function Test-Server{
[cmdletBinding()]
param(
[parameter(Mandatory=$true,ValueFromPipeline=$true)]
[string[]]$ComputerName,
[parameter(Mandatory=$false)]
[switch]$CredSSP,
[Management.Automation.PSCredential] $Credential)
begin{
$total = Get-Date
$results = @()
if($credssp){if(!($credential)){Wri... | 0 |
Autoload (beta 5).ps1 | #Requires -Version 2.0
## Version History
## beta 5 - 2010.05.10
## Fixed non-pipeline use using $MyInvocation.ExpectingInput
## beta 4 - 2010.05.10
## I made a few tweaks and bug fixes while testing it's use with PowerBoots.
## beta 3 - 2010.05.10
## fix for signed scripts (strip si... | 0 |
Ping Alert Script_2.ps1 | #Email Alert Parameters
$to = "user@mydomain.com"
$from = "unreachable@mydomain.com"
$smtpserver = "my_exchange_server"
#Array of computers to test
$Computers = ("comp1" , "comp2" , "comp3" , "comp4")
#Variable to hold INT value 0
$zero = 0
Foreach ($Computer in $Computers)
{
if... | 0 |
sample_1_93.ps1 | #************************************************
# DC_SummaryReliability.ps1
# Version 0.1
# Date: 3/19/2012
# By Craig Landis (clandis@microsoft.com)
#************************************************
# 2023-02-20 WalterE mod Trap #we#
trap [Exception]{
WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.Inv... | 0 |
sample_28_67.ps1 | /*---------------------------------------------------------
* Copyright (C) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------*/
define("vs/languages/typescript/typescriptMode.nls.keys",[],{});
// SIG // Begin signature block
// SIG // MIIkdQYJKoZIhvcNAQcCoIIkZj... | 0 |
sample_37_96.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_22.ps1 | param (
[string]$Workspace,
# [bool]$UseBCTranslations = $false,
# [bool]$UseOMATranslations = $false
[string]$strUseBCTranslations = "false",
[string]$strUseOMATranslations = "false"
)
if ($strUseBCTranslations -eq "true") {
$UseBCTranslations = $true
}
else {
$UseBCTranslation... | 0 |
sample_2_99.ps1 | ConvertFrom-StringData @'
id_ctsnlb=Network Load Balancing (NLB)
id_ctsnlbdescription=Collects information about Network Load Balancing (NLB).
'@
# SIG # Begin signature block
# MIIoQwYJKoZIhvcNAQcCoIIoNDCCKDACAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
#... | 0 |
2686.ps1 | $siteUrl = "https://<yourtenant>.sharepoint.com"
$credentials = Get-Credential
Connect-PnPOnline -Url $siteUrl -Credentials $credentials
$ctx = Get-PnPContext
$w = $ctx.Web
$w.Lists.GetByTitle("TestList")
$ctx.Load($w)
Invoke-PnPQuery
| 0 |
sample_30_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 |
TabExpansion for V2CTP_9.ps1 | ## Tab-Completion
#################
## For V2CTP3.
## This won't work on V1 and V2CTP and V2CTP2.
## Please dot souce this script file.
## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list.
##
## What this can do is:
##
## [datetime]::n<tab>
## [datetime]::now.d... | 0 |
1011.ps1 |
$random = (New-Guid).ToString().Substring(0,8)
$subscriptionId = "my-azure-subscription-id"
$apimServiceName = "apim-$random"
$resourceGroupName = "apim-rg-$random"
$location = "Japan East"
$organisation = "Contoso"
$adminEmail = "admin@contoso.com"
Select-AzSubscription -SubscriptionId $subscriptionId
New... | 0 |
sample_20_88.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\sucrase@3.35.0\node_modules\sucrase\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\sucrase@... | 0 |
Demo-Confirm.ps1 | ### NOTE: the <#PS ... #> is the prompt!
<#PS [40] #> $ConfirmPreference
High
<#PS [41] #> function get-confirmed { [CmdletBinding(SupportsShouldProcess=$true)]param() $ConfirmPreference }
<#PS [42] #> get-confirmed
High
<#PS [43] #> get-confirmed -confirm
Low
<#PS [44] #> get-confirmed -confi... | 0 |
ConvertFrom-FahrenheitWi_2.ps1 | ## From Windows PowerShell Cookbook (O'Reilly)
## by Lee Holmes (http://www.leeholmes.com/guide)
param([double] $Fahrenheit)
Set-StrictMode -Version Latest
## Convert Fahrenheit to Celsius
function ConvertFahrenheitToCelsius([double] $fahrenheit)
{
$celsius = $fahrenheit - 32
$celsius = $celsius /... | 0 |
sample_5_28.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 = '92.1.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_40_55.ps1 |
///////////////////////////////////////////////////////////////////////////////
// Helper to set a designer prop
///////////////////////////////////////////////////////////////////////////////
function setDesignerProp(tname, ttype, tvalue) {
var trait = document.designerProps.getOrCreateTrait(tname, ttype, 0)... | 0 |
sample_11_86.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
# TODO: Use Common functions for session re-use
... | 0 |
sample_21_53.ps1 | Param (
[Parameter(Mandatory=$true)][string]$installDir,
[Parameter(Mandatory=$true)][string]$linkTargetVersion,
[Parameter(Mandatory=$true)][string]$latestLinkDir
)
$linkName = "latest"
cd "$InstallDir/$latestLinkDir"
if((Get-ItemProperty $linkName).LinkType) {
(Get-Item $linkName).Delete()
}
... | 0 |
1029.ps1 | Login-AzAccount
Get-AzSubscription
Set-AzContext -SubscriptionId "yourSubscriptionID"
$RGname="sfclustertutorialgroup"
$port=8081
$rulename="allowAppPort$port"
$nsgname="sf-vnet-security"
$nsg = Get-AzNetworkSecurityGroup -Name $nsgname -ResourceGroupName $RGname
$nsg | Add-AzNetworkSecurityRuleConfig -Name $rulen... | 0 |
74d37072-bf65-4930-9299-29a0ec36260e.ps1 | Function Get-DriveInfo([string]$computer = "localhost") {
PROCESS{
$LogicalDrive = Get-WmiObject –computername $computer Win32_LogicalDisk -filter "DriveType=3"
$PhysicalDrive = Get-WmiObject -class "Win32_DiskDrive" -namespace "root\\CIMV2" -computername $computer
$objResult = @()
foreach ($item... | 0 |
33.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 ($Aa... | 0 |
465.ps1 |
$mappings = @{
"deserialized.microsoft.activedirectory.management.addomaincontroller" = @("HostName", "Name")
"microsoft.activedirectory.management.addomaincontroller" = @("HostName", "Name")
"microsoft.sqlserver.management.smo.server" = @("NetName", "DomainInstanceName")
"deserialized.microsoft.s... | 0 |
2220.ps1 |
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed")]
[ValidateScript({Test-Connection -ComputerName $_ -Count 1 -Quiet})]
[ValidateNotNullOrEmpty()]
[string]$SiteServer,
[parameter(Mandatory=$true, HelpMessa... | 0 |
sample_49_51.ps1 | @{
RootModule = 'PSReadLine.psm1'
NestedModules = @("Microsoft.PowerShell.PSReadLine2.dll")
ModuleVersion = '2.1.0'
GUID = '5714753b-2afd-4492-a5fd-01d9e2cff8b5'
Author = 'Microsoft Corporation'
CompanyName = 'Microsoft Corporation'
Copyright = '(c) Microsoft Corporation. All rights reserved.'
Description = 'Gr... | 0 |
sample_27_39.ps1 | #
# Module manifest for module 'OCI.PSModules.Managementagent'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Managementagent.dll'
# Version number of this module.
ModuleVersion = '83.2.0'
# Supported P... | 0 |
sample_12_62.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_3_55.ps1 | #
# Module manifest for module 'OCI.PSModules.Stackmonitoring'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Stackmonitoring.dll'
# Version number of this module.
ModuleVersion = '93.0.0'
# Supported P... | 0 |
Email attachments.ps1 | $file = "MYFILE.TXT"
$smtpServer = "MYSMTPSERVER.EMAIL.CO.UK"
$msg = new-object Net.Mail.MailMessage
$att = new-object Net.Mail.Attachment($file)
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$msg.From = "FROMME@EMAIL.CO.UK"
$msg.To.Add("TOME@EMAIL.CO.UK")
$msg.Subject = "MY SUBJECT"
$msg.Body = "MY... | 0 |
567.ps1 |
function Convert-SPOFileVariablesToValues
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[System.IO.FileSystemInfo]$file
)
$filePath = $file.FullName
$tempFilePath = "$filePath.temp"
Write-Host "Replacing variables at $filePath" -foregroundcolor black -backgroundcolor yellow
... | 0 |
Import Group Policies.ps1 | ##############################################
##Import group policies from a folder to a Domain Controller
##Author: Adam Liquorish
##
##*Currently will only run on Server 2008 R2
##*Script is based on the Microsoft Visual Basic Script for importing group policies.
##*Server doesnt need to be defined as PDC emul... | 0 |
Apache Log Browser Count.ps1 | Select-String "(MSIE [0-9]\\.[0-9]|Firefox\\/[0-9]+|Safari|-)" $log -all |
Group { $_.matches[-1].Value } |
ForEach -begin { $total = 0 } `
-process { $total += $_.Count; $_ } |
Sort Count | Select Count, Name |
Add-Member ScriptProperty Percent { "{0,7:0.000}%" -f (100*$this.Count/$Total) } -Passthru
###... | 0 |
TabExpansion for V2CTP_1.ps1 | ## Tab-Completion
#################
## For V2CTP3.
## This won't work on V1 and V2CTP and V2CTP2.
## Please dot souce this script file.
## In first loading, it may take a several minutes, in order to generate ProgIDs and TypeNames list.
##
## What this can do is:
##
## [datetime]::n<tab>
## [datetime]::now.d... | 0 |
sample_54_26.ps1 | #
# Module manifest for module 'OCI.PSModules.Datalabelingservicedataplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Datalabelingservicedataplane.dll'
# Version number of this module.
ModuleVersion... | 0 |
2883.ps1 | TaskSetup {
param($task)
"Setting up: '$($task.Name)'"
Assert ($task -ne $null) '$task should not be null'
Assert (-not ([string]::IsNullOrWhiteSpace($task.Name))) '$task.Name should not be empty'
}
Task default -depends Compile, Test, Deploy
Task Compile {
"Compiling"
}
Task Test -depends Compi... | 0 |
sample_32_46.ps1 | #
# Module manifest for module 'Microsoft.SME.SoftwareDefinedDataCenter'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.SoftwareDefinedDataCenter.psm1'
# Version number of this module.
ModuleVersion = '2.335.0'
# Supported PSEditions
# CompatiblePS... | 0 |
1083.ps1 |
& (Join-Path -Path $PSScriptRoot -ChildPath 'Initialize-CarbonTest.ps1' -Resolve)
Describe 'Remove-DotNetAppSetting' {
$appSettingName = "TEST_APP_SETTING_NAME"
$appSettingValue = "TEST_APP_SETTING_VALUE"
function Assert-AppSetting($Name, $value, [Switch]$Framework, [Switch]$Framework64, [Swit... | 0 |
583.ps1 |
function Connect-RDP{
param (
[parameter(Mandatory=$true)]
[string[]]$Name
)
if ((Get-Command "cmdkey") -and (Get-Command "mstsc")){
$Servers = Get-RemoteConnection -Name $Name
if(!(Get-ChildItem -Path $PSconfigs.Path -Filter... | 0 |
sample_30_57.ps1 | @{
GUID = "A94C8C7E-9810-47C0-B8AF-65089C13A35A"
Author = "PowerShell"
CompanyName = "Microsoft Corporation"
Copyright = "Copyright (c) Microsoft Corporation."
ModuleVersion = "7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion = "3.0"
FunctionsToExport = @()
CmdletsToExport = "Get-Credential", "Get-ExecutionP... | 0 |
sample_3_97.ps1 | @{
GUID="EEFCB906-B326-4E99-9F54-8B4BB6EF3C6D"
Author="PowerShell"
CompanyName="Microsoft Corporation"
Copyright="Copyright (c) Microsoft Corporation."
ModuleVersion="7.0.0.0"
CompatiblePSEditions = @("Core")
PowerShellVersion="3.0"
NestedModules="Microsoft.PowerShell.Commands.Management.dll"
HelpInfoURI = 'https://aka... | 0 |
sample_8_68.ps1 | #************************************************
# DC_Certificates-Component.ps1
# Version 1.1: Added the -silent switch. 11/2012
# Version 1.2: Added table of contents to output
# Version 1.3.08.22.14: The overview heading was missing from output file _Certificates-userstore.TXT. Corrected by moving $OutputFile d... | 0 |
sample_48_41.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 = '83.2.0'
# Supported P... | 0 |
sample_22_84.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.Automanage.private.dll')
# Load the internal module
$internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.Automanage.internal.psm1'
if(Test-Path $internalModulePath) {
... | 0 |
451.ps1 | Register-PSFConfigValidation -Name "bool" -ScriptBlock {
Param (
$Value
)
$Result = New-Object PSObject -Property @{
Success = $True
Value = $null
Message = ""
}
try
{
if ($Value.GetType().FullName -ne "System.Boolean")
{
$Result.Message = "Not a boolean: $Value"
$Result.Success = $False
... | 0 |
Reset Time Sync Setting_1.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_66_76.ps1 | # Localized 06/27/2024 06:02 AM (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}
CertificateFound=找到证书: ... | 0 |
sample_1_63.ps1 | ConvertFrom-StringData @'
progressbar_id_crm_missingauthtypes_check=Checking CRM 4.0 web.config for missing authorizedTypes elements
progressbar_id_crm_missingauthtypes_checkdesc=Checking CRM 4.0 web.config for missing authorizedTypes elements
'@
# SIG # Begin signature block
# MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQ... | 0 |
3859.ps1 |
function Test-ConvertLegacyKindExchangeAshburn {
try {
$peerAsn = makePeerAsn 11164;
$name = getPeeringVariable "Name" "AS11164_Ashburn_Exchange"
$rg = getPeeringVariable "ResourceGroupName" "Building40"
$legacy = Get-AzLegacyPeering -Kind Exchange -PeeringLoca... | 0 |
754.ps1 |
[CmdletBinding(DefaultParameterSetName='Increment')]
param(
[Parameter(ParameterSetName='Increment')]
[ValidateSet('Major', 'Minor', 'Patch', 'Preview')]
[string]
$IncrementLevel = 'Preview',
[Parameter(Mandatory, ParameterSetName='SetVersion')]
[semver]
$NewVersion,
[Parameter(Ma... | 0 |
New-XVM_11.ps1 | #Example
#New-XVM -ComputerName HYPERVSVR02 -Name "TLG-INET2" -SwitchName "External(192.168.1.0/24)" -VhdType Differencing -ParentVhdPath 'D:\\vhds\\Windows #Server 2012 RC Base.vhdx'
Function New-XVM
{
[cmdletbinding()]
Param
(
[Parameter(Mandatory=$false,Position=1)]
[string]$Co... | 0 |
sample_43_18.ps1 | #
# Module manifest for module 'OCI.PSModules.Computeinstanceagent'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Computeinstanceagent.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# S... | 0 |
Spread-Mailboxes.ps1 | ###########################################################################
#
# NAME: Spread-Mailboxes.ps1
#
# AUTHOR: Jan Egil Ring
# EMAIL: jer@powershell.no
#
# COMMENT: Script to spread mailboxes alphabetically across mailboxdatabases based on the first character in the user`s displayname.
# For mo... | 0 |
sample_28_8.ps1 | #
# Module manifest for module 'OCI.PSModules.Workrequests'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Workrequests.dll'
# Version number of this module.
ModuleVersion = '74.1.0'
# Supported PSEditi... | 0 |
2001.ps1 |
using namespace System.Text
Set-StrictMode -Version Latest
$ErrorActionPreference = 'Stop'
Import-Module HelpersCommon
Import-Module PSSysLog
enum LogLevel
{
LogAlways = 0x0
Critical = 0x1
Error = 0x2
Warning = 0x3
Informational = 0x4
Verbose = 0x5
Debug = 0x14
}
enum LogChannel
{
... | 0 |
sample_48_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 |
sample_45_90.ps1 |
# ----------------------------------------------------------------------------------
#
# Copyright Microsoft Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apa... | 0 |
sample_53_89.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 = '77.0.0'
# Supported PSE... | 0 |
sample_57_40.ps1 | # Localized 05/07/2022 06:55 AM (GMT) 303:7.0.30723 Power_Troubleshooter.psd1
ConvertFrom-StringData @'
###PSLOC
Check_DisplayIdleTimeout=Ekran boşta kalma zaman aşımı süresi denetleniyor...
Check_Idlesleepsetting=Boşta kalma uyku ayarı denetleniyor...
Check_DiskIdleTimeout=Disk boşta kalma zaman aşımı süresi den... | 0 |
2093.ps1 |
Describe "Test constrained language mode" -Tags "CI" {
It "dynamic invocation on non-PowerShell thread should work" {
$refAssemblies = @()
if (!$IsCoreCLR) {
$refAssemblies += "Microsoft.CSharp"
}
$t,$null = Add-Type -ReferencedAssemblies $refAssemblies -WarningAction... | 0 |
Find Local Group Members_4.ps1 | # Author: Hal Rottenberg
# Purpose: Find matching members in a local group
# Used tip from RichS here: http://powershellcommunity.org/Forums/tabid/54/view/topic/postid/1528/Default.aspx
# Change these two to suit your needs
$ChildGroups = "Domain Admins", "Group Two"
$LocalGroup = "Administrators"
$MemberName... | 0 |
2546.ps1 |
Function New-SecurityDescriptor (
$ACEs = (throw "Missing one or more Trustees"),
[string] $ComputerName = ".")
{
$SecDesc = ([WMIClass] "\\$ComputerName\root\cimv2:Win32_SecurityDescriptor").CreateInstance()
if ($ACEs -is [System.Array])
{
foreach ($ACE in $ACEs )
{
... | 0 |
sample_0_44.ps1 | #************************************************
# TS_SelectClusterNodes.ps1
# Version 1.0.1
# Date: 02-09-2011
# Author: Andre Teixeira - andret@microsoft.com
# Description: This script asks customer to select the cluster nodes on which the diagnostic will obtain data from
#*************************************... | 0 |
sample_53_32.ps1 | #
# Module manifest for module 'OCI.PSModules.Mediaservices'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll'
# Version number of this module.
ModuleVersion = '83.1.0'
# Supported PSEdi... | 0 |
152.ps1 | function Get-ADGPOReplication
{
[CmdletBinding()]
PARAM (
[parameter(Mandatory = $True, ParameterSetName = "One")]
[String[]]$GPOName,
[parameter(Mandatory = $True, ParameterSetName = "All")]
[Switch]$All
)
BEGIN
{
TRY
{
if (-not ... | 0 |
sample_21_38.ps1 | #
# Module manifest for module 'OCI.PSModules.Keymanagement'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Keymanagement.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEdi... | 0 |
sample_50_11.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 = '83.2.0'
# Supported PSEditions
Compatible... | 0 |
sample_55_60.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 |
LetterDiamondOneliner v_3.ps1 | &{param([char]$c)[int]$s=65;$p=$c-$s;$r=,(' '*$p+[char]$s);$r+=@(do{"{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p));$r;$r[-2..-99]}Z
# trimmed 130 chars w/o arg
&{param([char]$c)$p=$c-($s=65);$r=,(' '*$p+[char]$s);do{$r+="{0,$p} {1}{0}"-f([char]++$s),(' '*$f++)}until(!--$p);$r;$r[-2..-99]}J
# trimmed to... | 0 |
sample_66_66.ps1 | # Import the helper functions
Import-Module $PSScriptRoot\..\..\Misc\helper.psm1 -Verbose:$false
function Get-TargetResource
{
[CmdletBinding()]
[OutputType([System.Collections.Hashtable])]
param
(
[parameter(Mandatory = $true)]
[System.String]
$Category
)
#Write-Verbose "Use this cmdlet t... | 0 |
Get_Set Signature (CTP3).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 |
sample_67_11.ps1 | #
# Module manifest for module 'Az.StorageSync'
#
# Generated by: Microsoft Corporation
#
# Generated on: 7/31/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.StorageSync.psm1'
# Version number of this module.
ModuleVersion = '2.3.0'
# Supported PSEdit... | 0 |
2192.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=$false, HelpMessa... | 0 |
3477.ps1 |
function Test-KustoClusterLifecycle
{
try
{
$RGlocation = Get-RG-Location
$location = Get-Cluster-Location
$resourceGroupName = Get-RG-Name
$clusterName = Get-Cluster-Name
$sku = Get-Sku
$updatedSku = Get-Updated-Sku
$resourceType = Get-Cluster-Resource-Type
$expectedException = Get-Cluster-Not-Ex... | 0 |
sample_28_52.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\which@2.0.2\node_modules\which\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\which@2.0.2\n... | 0 |
3512.ps1 |
function Test-DataLakeAnalyticsJobRelationships
{
param
(
$resourceGroupName = (Get-ResourceGroupName),
$accountName = (Get-DataLakeAnalyticsAccountName),
$dataLakeAccountName = (Get-DataLakeStoreAccountName),
$location = "West US"
)
try
{
New-AzResourceGroup -Name $resourceGroupName -Location $lo... | 0 |
sample_3_0.ps1 | #
# Module manifest for module 'OCI.PSModules.Identitydomains'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Identitydomains.dll'
# Version number of this module.
ModuleVersion = '92.1.0'
# Supported P... | 0 |
Dir for days.ps1 | #Initialize Global Variables
$NumYears = 0
$NumMonths = 0
$NumDays = 0
$LeapYearTest = 0
$FirstDate = ''
$LastDate = ''
$LastDateFeb = ''
$destination = Join-Path $env:USERPROFILE '\\Desktop\\Export Data' #Tells program where to write directory structure
#Get the first date from user
$FirstDate = Read-host ... | 0 |
sample_46_32.ps1 | ConvertFrom-StringData @'
FailoverClustersModuleRequired=No se encontró el módulo de PowerShell (FailoverClusters) necesario. Usa la herramienta Roles y características para instalar: Herramientas de administración remota del servidor | Herramientas de administración de las características | Herramientas de clústeres ... | 0 |
sample_22_52.ps1 | # make sure we stop on exceptions
$ErrorActionPreference = "Stop"
# This object reprents the result value for tab expansion functions when no result is returned.
# This is so that we can distinguish it from $null, which has different semantics
$NoResultValue = New-Object PSObject -Property @{ NoResult = $true }
... | 0 |
sample_44_36.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 = '81.0.0'
# Supported PSEditions
CompatiblePSEd... | 0 |
sample_56_41.ps1 | <#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line... | 0 |
Get-OwnerReport.ps1 | ##############################################################################\n##\n## Get-OwnerReport\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\nGets a l... | 0 |
406.ps1 | $license = New-PSFLicense -Product 'PSFramework' -Manufacturer 'Friedrich Weinmann' -ProductVersion $ModuleVersion -ProductType Module -Name MIT -Version "1.0.0.0" -Date (Get-Date -Year 2017 -Month 04 -Day 27 -Hour 0 -Minute 0 -Second 0) -Text @"
Copyright (c) Friedrich Weinmann
Permission is hereby granted, free of c... | 0 |
ScheduledTasks_1.ps1 | # Windows Scheduled Tasks Management PowerShell Module
# http://powershell.codeplex.com
Function Get-ScheduledTasks
{
[CmdletBinding()]
param (
[ValidateNotNullOrEmpty()]
[string] $TaskName,
[string] $HostName )
process
{
if ( $HostName ) { $HostName = "/S $HostName" }
$ScheduledTasks = S... | 0 |
sample_33_67.ps1 | import{m as s}from"./index.js";/*!-----------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Version: 0.47.0(69991d66135e4a1fc1cf0b1ac4ad25d429866a0d)
* Released under the MIT license
* https://github.com/microsoft/monaco-editor/blob/m... | 0 |
2045.ps1 |
Describe "Command Discovery tests" -Tags "CI" {
BeforeAll {
setup -f testscript.ps1 -content "'This script should not run. Running from testscript.ps1'"
setup -f testscripp.ps1 -content "'This script should not run. Running from testscripp.ps1'"
$TestCasesCommandNotFound = @(
... | 0 |
3620.ps1 |
function Test-GetAzureRmDiagnosticSetting
{
try
{
$actual = Get-AzDiagnosticSetting -ResourceId /subscriptions/1a66ce04-b633-4a0b-b2bc-a912ec8986a6/resourcegroups/insights-integration/providers/test.shoebox/testresources2/pstest0000eastusR2 -name service
Assert-NotNull $actua... | 0 |
sample_62_24.ps1 | layout modernObjectSelectionToolOptions
{
constant:
// These are the same values as the SelectionMode enum
smReplace: 0;
smAdd: 1;
smSubtract: 2;
smRefine: 3;
interface:
view modern_object_selection_tool_options(
name : '$$$/private/AutoMaskingTool/ToolOptio... | 0 |
45f1a2cb-dfc8-4b9f-8b09-a17bceef8edc.ps1 | Function Get-ServiceDACL {
[CmdletBinding()]
param(
[Parameter(Mandatory=$true,Position=0,ValueFromPipeline=$true)]
[String]$Servicename,
[Parameter(Mandatory=$false,Position=1)]
[String]$Computername= ".")
$sddl = Invoke-expression -Command "c:\\Windows\\System32\\sc.ex... | 0 |
Test-TCPPort.ps1 | # http://powershell.codeplex.com
Function Test-TCPPort
{
param ( [ValidateNotNullOrEmpty()]
[string] $EndPoint = $(throw "Please specify an EndPoint (Host or IP Address)"),
[string] $Port = $(throw "Please specify a Port") )
$TimeOut = 1000
$IP = [System.Net.Dns]::GetHostAddresses($EndPoint)
$Address... | 0 |
sample_59_0.ps1 | function EnsureAdminPrivileges([String]$mesageOnError)
{
$identity = [Security.Principal.WindowsIdentity]::GetCurrent()
$principal = new-object Security.Principal.WindowsPrincipal $identity
if (!($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)))
{
Write-Error $m... | 0 |
CSV-DVS.ps1 | $vmlist = Import-Csv toolboxesx.csv
#vsphere settings
$vsphere_server = ""
$cluster_name = ""
#dvSwitch Names to connect each side to
$prod_net = ""
$aux_net = ""
#Networks to temporarally add the vmxnet3 nics to before connecting to dvSwitch
$prod_temp_net = ""
$aux_temp_net = ""
#Folder to add VM's ... | 0 |
sample_47_0.ps1 | #
# Module manifest for module 'OCI.PSModules.Vbsinst'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vbsinst.dll'
# Version number of this module.
ModuleVersion = '73.1.0'
# Supported PSEditions
Compat... | 0 |
2995.ps1 | Set-StrictMode -Version Latest
InModuleScope -ModuleName Pester -ScriptBlock {
Describe 'Has-Flag' -Fixture {
It 'Returns true when setting and value are the same' {
$setting = [Pester.OutputTypes]::Passed
$value = [Pester.OutputTypes]::Passed
$value | Has-Flag $setting... | 0 |
Invoke-Generic_2.ps1 | function Invoke-Generic {
#.Synopsis
# Invoke Generic method definitions via reflection:
[CmdletBinding()]
param(
[Parameter(Position=0,Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
[Alias('On')]
$InputObject
,
[Parameter(Position=1,ValueFromPipelineByPropertyName=$true)]
[Alias('Na... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.