filename stringlengths 5 142 | content stringlengths 2 26M | label int64 0 1 |
|---|---|---|
sample_18_49.ps1 | # Localized 06/28/2023 07:56 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1
ConvertFrom-StringData @'
###PSLOC
Troubleshoot_Title=トラブルシューティング
Troubleshoot_DetectNetworkCache=Windows Media Player のネットワーク キャッシュを確認しています...
Resolution_Title=解決策
Resolution_ResetConfiguration=すべての構成設定をリセットしています...
Resolution_ResetNe... | 0 |
sample_17_83.ps1 | #
# Module manifest for module 'OCI.PSModules.Fleetsoftwareupdate'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Fleetsoftwareupdate.dll'
# Version number of this module.
ModuleVersion = '80.0.0'
# Sup... | 0 |
2285.ps1 | [CmdletBinding()]
param(
[parameter(Mandatory=$true)]
[string]$SiteServer,
[parameter(Mandatory=$true)]
[string]$MDTServer,
[parameter(Mandatory=$true)]
[string]$MDTDatabase
)
function Load-Window {
if ((Connect-CMSiteServer -CMSiteServer $SiteServer) -eq $true) {
Connect-MDTDataba... | 0 |
3681.ps1 |
function Test-TriggerCrud
{
$ResourceGroupName = getAssetName
try{
$AccountName = getAssetName
$SubName = getAssetName
$TriggerName = getAssetName
$RecurrenceInterval = "hour"
$SynchronizationTime = "06/19/2019 22:53:33"
$newTrigger = New-AzDataShareTrigger -ResourceGroupName $Resourc... | 0 |
2496.ps1 | [reflection.assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null
function Run-Query()
{
param (
$SqlQuery,
$SqlServer,
$SqlCatalog
)
$SqlConnection = New-Object System.Data.SqlClient.SqlConnection("Data Source=$SqlServer;Integrated Security=SSPI;Initial Catalog=$SqlCatalog;");
$SqlCmd = Ne... | 0 |
sample_38_79.ps1 | # These Pester tests are for the for parameter-* and ex-path* snippets.
# Take a look at the .vscode\tasks.json file to see how you can create
# and configure a test task runner that will run all the Pester tests
# in your workspace folder.
# To run these Pester tests, press Ctrl+Shift+T or press Ctrl+Shift+P,
#... | 0 |
1712.ps1 | function Get-ServiceNowChangeRequest {
[OutputType([System.Management.Automation.PSCustomObject])]
[CmdletBinding(DefaultParameterSetName, SupportsPaging)]
Param(
[Parameter(Mandatory = $false)]
[string]$OrderBy = 'opened_at',
[Parameter(Mandatory = $false)]
... | 0 |
2349.ps1 |
[CmdletBinding()]
[OutputType('System.DirectoryServices.ActiveDirectorySecurity')]
param (
[Parameter(Mandatory,
ValueFromPipeline,
ValueFromPipelineByPropertyName)]
[string[]]$Hostname,
[Parameter(ValueFromPipeline,
ValueFromPipelineByPropertyName)]
[string]$DomainName = (Get-ADDomain).Forest,... | 0 |
2095.ps1 |
Describe "Tests for (error, warning, etc) action preference" -Tags "CI" {
$commonActionPreferenceParameterTestCases = foreach ($commonParameterName in [System.Management.Automation.Cmdlet]::CommonParameters | Select-String Action) {
@{
ActionPreferenceParameterName = $commonParameterName
... | 0 |
sample_42_98.ps1 | @{
# Script module or binary module file associated with this manifest
ModuleToProcess = 'nuget.psm1'
# Version number of this module.
ModuleVersion = '2.0.0.0'
# ID used to uniquely identify this module
GUID = '76e6f9c4-7045-44c0-a557-17fab0835c12'
# Author of this module
Author = 'NuGet Team'
# Com... | 0 |
sample_56_98.ps1 | #
# Module manifest for module 'OCI.PSModules.Vault'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vault.dll'
# Version number of this module.
ModuleVersion = '87.0.0'
# Supported PSEditions
Compatible... | 0 |
sample_10_37.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
if (Test-Path "$PSScriptRoot\bin")
{
# Loa... | 0 |
4054.ps1 | param(
[string]$refPath = 'Pscx1_0Commands.xml',
[string]$diffPath = 'Pscx1_1Commands.xml'
)
function Remove-Aliases($cmdal) {
$script:aliases = $($script:aliases |? {
$cmdal -notcontains $_.Name
})
}
function Get-CommandNoun($command) {
$command.Split('-', 2)[1]
}
function Get-AliasCommand($al) {
$diff |?... | 0 |
sample_59_7.ps1 | #
# Module manifest for module 'OCI.PSModules.Osubbillingschedule'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Osubbillingschedule.dll'
# Version number of this module.
ModuleVersion = '85.1.0'
# Sup... | 0 |
WinFirewall-Disabled.ps1 | function WinFirewall-Disabled(){
param (
$computer
)
c:\\PsTools\\PsExec.exe \\\\"$computer" sc config sharedaccess start= disabled
}
| 0 |
Create random strings_1.ps1 | # ===============================================================
# / Author: Marcus L. Farmer
# / Script: createRandomStrings.ps1
# / Date: 2-04-2009
# / Purpose: generate pseudorandomly generated strings for passwords or other uses
# / Usage: ./createRandomStrings.ps1
# / Reqs.: none... | 0 |
1376.ps1 |
function Uninstall-CJunction
{
[CmdletBinding(SupportsShouldProcess=$true,DefaultParameterSetName='Path')]
param(
[Parameter(Mandatory=$true,Position=0,ParameterSetName='Path')]
[string]
$Path,
[Parameter(Mandatory=$true,ParameterSetName='LiteralPath')]
[s... | 0 |
Get-WebFile _2.6.ps1 | ## Get-WebFile (aka wget for PowerShell)
##############################################################################################################
## Downloads a file or page from the web
## History:
## v3.7 - Added Credentials parameter for passing credentials via System.Net.NetworkCredential
## v3.6 - Add -... | 0 |
3793.ps1 |
function Test-VirtualMachineExtension
{
$rgname = Get-ComputeTestResourceName
try
{
$loc = Get-ComputeVMLocation;
New-AzResourceGroup -Name $rgname -Location $loc -Force;
$vmsize = 'Standard_A2';
$vmname = 'vm' + $rgname;
$p = N... | 0 |
sample_33_27.ps1 | #
# Module manifest for module 'Microsoft.SME.Insights'
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Microsoft.SME.Insights.psm1'
# Version number of this module.
ModuleVersion = '2.25.0'
# Supported PSEditions
# CompatiblePSEditions = @()
# ID used to uniq... | 0 |
sample_20_62.ps1 | # Localized 05/06/2022 10:04 PM (GMT) 303:7.0.30723 ArchiveResources.psd1
# Localized ArchiveResources.psd1
ConvertFrom-StringData @'
###PSLOC
PathNotFoundError=The path '{0}' either does not exist or is not a valid file system path.
ExpandArchiveInValidDestinationPath=The path '{0}' is not a valid file system ... | 0 |
ModuleWriteError_1.psm1.ps1 | ################################################################################
## Script Name: Module Write Error
## Created On: 1/7/2010
## Author: Thell Fowler
## Tribute: Joel 'Jaykul' Bennet
## File: ModuleWriteError.psm1
## Usage: import-module \\Path\\to\\module\\M... | 0 |
Get-User_8.ps1 | $script:dse = 'LDAP://my.domain.com'
function script:User-Exists([string]$username)
{
$username = $($username).Trim()
$srch = New-Object DirectoryServices.DirectorySearcher $global:dse
$srch.Filter = "(&(objectClass=user)(sAMAccountName=$username))"
$srch.PageSize = 10000
$srch.SearchScope = "Subtree... | 0 |
1296.ps1 |
function Install-CMsmqMessageQueue
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Mandatory=$true)]
[string]
$Name,
[Switch]
$Private,
[Switch]
$Transactional
)
Set-StrictMod... | 0 |
4259.ps1 |
Function Invoke-WMIEvent
{
Param
(
[Parameter(Mandatory=$true)][string]
$Name,
[Parameter(Mandatory=$true)][string]
$Command,
[string]
$Hour=9,
[string]
$Minute=30
)
$Filter=Set-WmiInstance -Class __EventFilter -Namespace "root\subscrip... | 0 |
4235.ps1 | function Invoke-ReverseDnsLookup
{
Param (
[Parameter(Position = 0, Mandatory = $True,ValueFromPipeline=$True)]
[String]
$IpRange
)
BEGIN {
function Parse-IPList ([String] $IpRange)
{
function IPtoInt
{
Param([S... | 0 |
3694.ps1 |
function Test-DataSetCrud
{
try
{
$resourceGroup = getAssetName
$AccountName = getAssetName
$ShareName = getAssetName
$DataSetName = getAssetName
$StorageAccountId = getAssetName
$ContainerName = getAssetName
$createdContainerDataset = New-AzDataShareDataSet -ResourceGroupName $resourceGroup -Acco... | 0 |
sample_24_95.ps1 | ConvertFrom-StringData -StringData @'
AdapterNotFound = 指定されたアダプターは見つかりませんでした: {0}
InvalidParams = 無効なパラメーターのセット。パラメーター・セットを確認するには、cmdlet ヘルプを参照してください。
InvalidParamsAdapterAndName = Name と Adapter の両方のパラメーターを指定することはできません。
InvalidParamsConfigAndModule = Module と Configuration の両方のパラメーターを指定することはできません。
InvalidModule ... | 0 |
181.ps1 |
function Start-KeyLogger($Path = "$env:temp\keylogger.txt")
{
$signatures = @'
[DllImport("user32.dll", CharSet=CharSet.Auto, ExactSpelling=true)]
public static extern short GetAsyncKeyState(int virtualKeyCode);
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern int GetKeyboardState(byte[] keyst... | 0 |
Get-GrowthRate.ps1 | function Get-GrowthRate {
param( $Start, $End, $Period )
$rate = [math]::Abs( [math]::Pow( ( $End / $Start ),( 1 / $per - 1 ) ) - 1 )
"{0:P}" -f $rate
}
| 0 |
Get-SpecialPath.ps1 | ###############################################################################
## Get-SpecialPath Function (should be an external function in your profile, really)
## This is an enhancement of [Environment]::GetFolderPath($folder) to add
## support for 8 additional folders, including QuickLaunch, and the commo... | 0 |
Get Exchange DB Stats_1.ps1 | # requires -version 2.0
#
# get-sgstats2010.ps1
#
# returns various info about storage groups
#
# Author: rfoust@duke.edu
# Modified: May 20, 2012
#
# This has only been tested with Exchange 2010
# Use -nomountpoint if you don't use mountpoints in your environment
param([string]$server=$env:computername.to... | 0 |
sample_42_88.ps1 | <#############################################################
# #
# Copyright (C) Microsoft Corporation. All rights reserved. #
# #
#############################################################>
... | 0 |
QAD.psm1.ps1 | #
# Module manifest for module 'QAD'
#
# Generated from: Quest.ActiveRoles.ADManagement
#
# Generated on: 1/28/2011
#
@{
# Script module or binary module file associated with this manifest
ModuleToProcess = 'Quest.ActiveRoles.ArsPowerShellSnapIn.dll'
# Version number of this module.
ModuleVersion = '1.... | 0 |
Get-WebFile _1.7.3.ps1 | ## Get-WebFile (aka wget for PowerShell)
##############################################################################################################
## Downloads a file or page from the web
## History:
## v3.7.3 - Checks to see if URL is formatted properly (contains http or https)
## v3.7.2 - Puts a try-catch b... | 0 |
sample_50_72.ps1 |
# This is a sample script to get user's cred roam data from AD only
# The script must be executed in the context of account with at least read access to user's AD account
# Replace Win2019DC2.contoso2016.com with the fqdn of the DC
# Replace contoso2016\credroamtu1 with the domain_name\user_name of the target user... | 0 |
format-custom_1.ps1 | ## UI Automation v 1.8 -- REQUIRES the Reflection module (current version: http://poshcode.org/3174 )
##
# WASP 2.0 is getting closer, but this is still just a preview:
# -- a lot of the commands have weird names still because they're being generated ignorantly
# -- eg: Invoke-Toggle.Toggle and Invoke-Invoke.Invo... | 0 |
Check latest BIOS Rev_1.ps1 | $BiosRev = Get-WmiObject -Class Win32_BIOS -ComputerName $ComputerName -Credential $Credentials
# Shortened URL for the Dell Support page, fileid=441102, appears to be the identifier for BIOS downloads
# I tested this on a few different models of Dell workstations.
$DellBIOSPage = "http://support.dell.com/suppor... | 0 |
RunAsAdmin Tool.ps1 | <#
DOWNLOAD THE DEPLOY PACKAGE FROM http://techjeeper.com/?page_id=112 for all the pieces to make this work.
Author: Cody Dean (aka TechJeeper)
Date: 3-16-2013
RunAsAdmin uses (and includes) the following tools:
PowerShell Community Extensions
SysInternals PsExec
PSTerminalServices
Make-ps1exewrapper.ps... | 0 |
880.ps1 |
$ResourceGroupName = "ResourceGroup01"
$SubscriptionID = "SubscriptionID"
$WorkspaceName = "DefaultWorkspace-" + (Get-Random -Maximum 99999) + "-" + $ResourceGroupName
$Location = "eastus"
$ErrorActionPreference = "Stop"
Write-Output "Pulling Azure account credentials..."
$Account = Add-AzAccount
if ([string]:... | 0 |
sample_53_53.ps1 | #
# Module manifest for module 'Az.CloudService'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.CloudService.psm1'
# Version number of this module.
ModuleVersion = '2.0.1'
# Supported PSE... | 0 |
sample_15_82.ps1 | #!/usr/bin/env pwsh
$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
$exe=""
$pathsep=":"
$env_node_path=$env:NODE_PATH
$new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\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 |
3562.ps1 |
$seed = "98"
function getVaultName{
return "A2APowershellTest" + $seed;
}
function getVaultRg{
return "A2APowershellTestRg" + $seed;
}
function getVaultRgLocation{
return "eastus"
}
function getVaultLocation{
return "eastus"
}
function getPrimaryLocation
{
return "westus"
}
... | 0 |
4300.ps1 |
function SuiteSetup {
Import-Module "$PSScriptRoot\PSGetTestUtils.psm1" -WarningAction SilentlyContinue
Import-Module "$PSScriptRoot\Asserts.psm1" -WarningAction SilentlyContinue
$script:ProgramFilesScriptsPath = Get-AllUsersScriptsPath
$script:MyDocumentsScriptsPath = Get-CurrentUserScriptsPath
... | 0 |
3079.ps1 | function MeinValidator($thing_to_validate) {
return $thing_to_validate.StartsWith("s")
}
function Invoke-SomethingThatUsesMeinValidator {
param(
[ValidateScript( {MeinValidator $_})]
$some_param
)
}
| 0 |
sample_67_80.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 |
finddupe_3.ps1 | function Get-MD5([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]'))
{
$stream = $null;
$cryptoServiceProvider = [System.Security.Cryptography.MD5CryptoServiceProvider];
$hashAlgorithm = new-object $cryptoServiceProvider
$stream = $file.OpenRead();
$hashByteArray = $hashA... | 0 |
sample_15_37.ps1 | #************************************************
# TS_ServicingPendingXml.ps1
# Version 1.0.1
# Date: 6/6/2012
# Author: v-alyao
# Description: [Idea ID 3472] [Windows] Pending Transactions Rule Idea - Pending.xml
# Rule number: 3472
# Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.a... | 0 |
Get-ComputerSession.ps1 | Function Get-ComputerSession {
<#
.SYNOPSIS
Retrieves all user sessions from local or remote server/s
.DESCRIPTION
Retrieves all user sessions from local or remote server/s. Requires query.exe in order to run properly.
.PARAMETER computer
Name of computer/s to run session query against. ... | 0 |
Convert-BounceToX_6.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 |
1672.ps1 | function ConvertTo-Bytes {
param (
[string]$file
)
if (!$file -or !(Test-Path $file)) {
throw "file not found: '$file'"
}
[convert]::ToBase64String((Get-Content $file -Encoding Byte))
}
| 0 |
sample_12_7.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 = '75.1.0'
# Supported P... | 0 |
sample_5_52.ps1 | #************************************************
# DC_BitsServer-Component.ps1
# Version 1.0
# Date: 2009
# Author: Boyd Benson (bbenson@microsoft.com)
# Description: Collects information about the BITS Server Component.
#*******************************************************
Trap [Exception]
{
# Handle... | 0 |
sample_23_8.ps1 | Intel vPro Technology Module for Microsoft Windows PowerShell Installation and User Guide v 5.6 Intel AMT Third Party Data Storage (3PDS) ....................................................... 40 5.6.1 Set-AMT3PDS ................................................................................. 40 5.6.2 Get-AMT3PDS... | 0 |
662.ps1 |
Describe 'New-RsScheduleXML' {
$CurrentDate = Get-Date
Context 'New-RsScheduleXML -Once' {
$Schedule = New-RsScheduleXML -Once -Start $CurrentDate
It 'Should return valid schedule XML' {
@($Schedule).Count | Should Be 1
$Schedule | Should BeOfType... | 0 |
4022.ps1 |
function Test-MoveAzureResource
{
$sourceResourceGroupName = "testResourceGroup1"
$destinationResourceGroupName = "testResourceGroup2"
$testResourceName1 = "testResource1"
$testResourceName2 = "testResource2"
$location = "West US"
$apiversion = "2014-04-01"
$providerNamespace ... | 0 |
Kill Outlook + CopyPST.ps1 | $rep_du_user = $env:userprofile
$repertoire_pst = ($rep_du_user+"\\AppData\\Local\\Microsoft\\Outlook")
$repertoire_sauvegarde = "directory"
#Kill de outlook
Get-Process | Where { $_.Name -Eq "outlook" } | Kill
#wait and see :)
sleep 10
#copy des pst
xcopy $repertoire_pst $repertoire_sauvegarde /D /E /C /... | 0 |
sample_64_64.ps1 | <!--
* @Description:
* @Author: czw
* @Date: 2022-07-05 20:09:56
* @FilePath: \vscode-background-cover\CHANGELOG.md
-->
## 更新日志
#### ver 0.1.0 (2018/10/17)
第一版发布
#### ver 1.0.0 (2018/11/08)
添加随机更换背景的功能
#### ver 1.1.0 (2019/01/04)
添加卸载钩子
#### ver 1.1.1 (2019/03/16)
增加图片透明度(对于亮度低的图片)
##... | 0 |
Start-Encryption_4.ps1 | ## Start-Encryption
##################################################################################################
## Rijndael symmetric key encryption ... with no passes on the key. Very lazy.
## USAGE:
## $encrypted = Encrypt-String "Oisin Grehan is a genius" "P@ssw0rd"
## Decrypt-String $encrypted "P@ssw0rd... | 0 |
Get-MailboxImportRequest.ps1 | # .Synopsis
# Use the Get-MailboxImportRequestProgress cmdlet to view detailed information about pst import progress.
# .Description
# The Get-MailboxImportRequestProgress cmdlet displays statistics on imports currently in progress that help determine if a import is likely to complete successfully. To accureatel... | 0 |
sample_33_17.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 |
577.ps1 |
function Uninstall-SPOSolution
{
[CmdletBinding()]
param
(
[Parameter(Mandatory=$true, Position=1)]
[string]$solutionName
)
Write-Host "Deactivate solution $path" -foregroundcolor black -backgroundcolor yellow
Switch-SPOEnableDisableSolution -solutionName $solutionName -activate $false
Write-Host ... | 0 |
686.ps1 |
function Set-PbiRsUrlReservation
{
[cmdletbinding()]
param
(
[string]
$ReportServerVirtualDirectory = "ReportServer",
[string]
$PortalVirtualDirectory="Reports",
[Alias('SqlServerInstance')]
[string]
$ReportServerInstance... | 0 |
Resolve-Aliases _1.7.ps1 | #requires -version 2.0
## ResolveAliases Module v 1.6
########################################################################################################################
## Sample Use:
## Resolve-Aliases Script.ps1 | Set-Content Script.Resolved.ps1
## ls *.ps1 | Resolve-Aliases -Inplace
##############... | 0 |
351.ps1 | function Test-PSFFeature
{
[OutputType([bool])]
[CmdletBinding()]
param (
[PsfValidateSet(TabCompletion = 'PSFramework.Feature.Name')]
[parameter(Mandatory = $true)]
[string]
$Name,
[string]
$ModuleName
)
begin
{
$featureItem = Get-PSFFeature -Name $Name
}
process
{
if (-not $featureItem.... | 0 |
sample_43_31.ps1 | #
# Module manifest for module 'OCI.PSModules.Lockbox'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Lockbox.dll'
# Version number of this module.
ModuleVersion = '81.0.0'
# Supported PSEditions
Compat... | 0 |
sample_44_34.ps1 | #
# Module manifest for module 'OCI.PSModules.Governancerulescontrolplane'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Governancerulescontrolplane.dll'
# Version number of this module.
ModuleVersion =... | 0 |
1324.ps1 |
function Disable-CFirewallStatefulFtp
{
[CmdletBinding(SupportsShouldProcess=$true)]
param(
)
Set-StrictMode -Version 'Latest'
Use-CallerPreference -Cmdlet $PSCmdlet -Session $ExecutionContext.SessionState
if( -not (Assert-CFirewallConfigurable) )
{
return
}
Inv... | 0 |
4070.ps1 |
Clear-Host
$Global:OS
$Global:RelativePath
$FileLoc = "C:\Program Files\Autodesk\Revit 2013\Program\"
$DLL_01 = "RS.Common.ClientServer.Proxy"
$DLL_02 = "DataStorageClient"
$DLL_03 = "DesktopMFC"
$DLL_04 = "FamilyDB"
$DLL_05 = "GeomUtil"
$DLL_06 = "Graphics"
$DLL_07 = "GrphOGS3"
$DLL_08 = "CommandServiceClient"
... | 0 |
sample_13_93.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 = 'ht... | 0 |
sample_15_76.ps1 | # Copyright (C) Intel Corporation,2021 All Rights Reserved.
function Invoke-AddPrivateKey {
<#
.Synopsis
Add a private key to AMT
.Description
This cmdlet adds a private key to AMT using a private key file given by user.
.Notes
Supported AMT Firmware Versions: 3.2 and higher
AMT P... | 0 |
sample_5_18.ps1 | ConvertFrom-StringData @'
id_ctsrpc=Remote Procedure Call (RPC)
id_ctsrpcdescription=Collects information about Remote Procedure Call (RPC).
'@
# SIG # Begin signature block
# MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
# K... | 0 |
175.ps1 | function Get-ComputerOS
{
[CmdletBinding()]
PARAM (
[Parameter(ParameterSetName = "Main")]
[Alias("CN","__SERVER","PSComputerName")]
[String[]]$ComputerName = $env:ComputerName,
[Parameter(ParameterSetName="Main")]
[Alias("RunAs")]
[System.Management.Automation.... | 0 |
sample_6_92.ps1 | #
# Module manifest for module 'OCI.PSModules.Apmsynthetics'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Apmsynthetics.dll'
# Version number of this module.
ModuleVersion = '93.0.0'
# Supported PSEdi... | 0 |
814ade13-24cf-4b85-beea-d9492ddd8e1e.ps1 | $DriveLetter = "D:"
$MaxShrink = 0.30 # 0.30 equals 30%
$MinShrink = 0.20 # 0.20 equals 20%
$FileLocation = $env:Temp
$FileName4DiskPart = "Shrink.txt"
$DiskDrive = GWMI -CL Win32_LogicalDisk | Where {$_.DeviceId -Eq "$DriveLetter"}
$DriveSize = ($DiskDrive.Size /1GB)
$DriveSize = [int]$DriveSize
$DesiredSh... | 0 |
4122.ps1 |
param
(
[switch]$EventLogServiceStopped,
[switch]$KernelBootType,
[switch]$MultiprocessorFree,
[switch]$EventLogServiceStarted
)
function Initialize-HardwareInventory {
[CmdletBinding()]
param ()
$Output = "Initiate SCCM Hardware Inventory....."
$SMSCli = [wmiclass] "\\localhost\root\ccm:SMS_Client"
$Err... | 0 |
sample_13_39.ps1 | #
# Module manifest for module 'OCI.PSModules.Loggingingestion'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Loggingingestion.dll'
# Version number of this module.
ModuleVersion = '75.1.0'
# Supported... | 0 |
sample_13_21.ps1 | # region Generated
# Load the private module dll
$null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.AppConfiguration.private.dll')
# Get the private module's instance
$instance = [Microsoft.Azure.PowerShell.Cmdlets.AppConfiguration.Module]::Instance
# Export nothing to clear i... | 0 |
sample_65_43.ps1 | #
# Module manifest for module 'OCI.PSModules.Vault'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Vault.dll'
# Version number of this module.
ModuleVersion = '88.1.0'
# Supported PSEditions
Compatible... | 0 |
sample_56_63.ps1 | param(
[parameter(Mandatory = $false)]
$databaseName,
[parameter(Mandatory = $false)]
$databaseUserName,
[parameter(Mandatory = $false)]
$databaseUserPassword,
[parameter(Mandatory = $true)]
$databaseAdminUser,
[parameter(Mandatory = $true)]
$databaseAdminPasswo... | 0 |
1724.ps1 | function Get-ServiceNowRequest {
[OutputType([System.Management.Automation.PSCustomObject])]
[CmdletBinding(DefaultParameterSetName, SupportsPaging)]
Param(
[Parameter(Mandatory = $false)]
[string]$OrderBy = 'opened_at',
[Parameter(Mandatory = $false)]
[Val... | 0 |
sample_28_86.ps1 | #
# Module manifest for module 'Az.ContainerRegistry'
#
# Generated by: Microsoft Corporation
#
# Generated on: 23/04/2024
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'Az.ContainerRegistry.psm1'
# Version number of this module.
ModuleVersion = '4.2.1'
# Sup... | 0 |
The Letter Diamond_1.ps1 | ## Write a program which draws a diamond of the form illustrted
## below. The letter which is to appear at the widest point of the
## figure (E in the example) is to be specified as the input data.
## A
## B B
## C C
## D D
## E E
## D D
## ... | 0 |
sample_45_26.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 = '74.1.0'
# Supported PSEditions
Co... | 0 |
Deploy VM with Static IP_4.ps1 | # 1. Create a simple customizations spec:
$custSpec = New-OSCustomizationSpec -Type NonPersistent -OSType Windows `
-OrgName “My Organization” -FullName “MyVM” -Domain “MyDomain” `
–DomainUsername “user” –DomainPassword “password”
# 2. Modify the default network customization settings:
$custSpec | Get-OS... | 0 |
Get-User_2.ps1 | function Get-User($user)
{
# this function should be passed the CN of the user to be returned
$dom = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$root = [ADSI] "LDAP://$($dom.Name)"
$searcher = New-Object System.DirectoryServices.DirectorySearcher $root
$searcher.filter = "(&(objec... | 0 |
sample_52_39.ps1 | # a simple PowerShell script to update icons in the resources/icons directory
# the original icons are loaded from https://github.com/microsoft/fabric-samples/blob/main/docs-samples/Icons.zip
$rootPathMono = Get-Item -Path "./resources/icons/mono"
$monoIcons = $rootPathMono | Get-ChildItem -Recurse -Include *.svg
... | 0 |
sample_61_16.ps1 | #
# Module manifest for module 'OCI.PSModules.Marketplace'
#
# Generated by: Oracle Cloud Infrastructure
#
#
@{
# Script module or binary module file associated with this manifest.
RootModule = 'assemblies/OCI.PSModules.Marketplace.dll'
# Version number of this module.
ModuleVersion = '85.2.0'
# Supported PSEdition... | 0 |
Join-Collections.ps1 | #requires -version 2.0
#.Note
# Depends on ConvertFrom-HashTable http://poshcode.org/1118
#.Synopsis
# Performs an inner join on two collections of objects based on a common key column.
#.Description
# Takes two sets of objects where there are multiple "rows" and where each set has a shared column where th... | 0 |
sample_57_88.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 = '86.2.0'
# Supported PSEditions
Compatib... | 0 |
sample_6_65.ps1 | PARAM ($WorkingPath = $PWD.Path, $SchemaXMLPath = 'ConfigXPLSchema.xml')
## Initializing Variables
$ComputerName = $Env:COMPUTERNAME
[xml] $SchemaXML = $null
$DiscoveryReportXMLPath = Join-Path $WorkingPath ($ComputerName + '_DiscoveryReport.xml')
$StatusXMLPath = Join-Path $WorkingPath ($ComputerName + '... | 0 |
A Compare-Object Bug.ps1 | # I want do demonstrate a Compare-object bug
# Bernd Kriszio - http://pauerschell.blogspot.com/
1, 2, 3, 4, 5 > .\\textfile_a.txt
1, 2, 4, 5, 6 > .\\textfile_b.txt
cat .\\textfile_a.txt
cat .\\textfile_b.txt
compare-object (gc .\\textfile_a.txt) (gc .\\textfile_b.txt) -inc
<#yields
InputObject ... | 0 |
sample_63_55.ps1 | #
# Copyright 2018-2024 HP Development Company, L.P.
# All Rights Reserved.
#
# NOTICE: All information contained herein is, and remains the property of HP Inc.
#
# The intellectual and technical concepts contained herein are proprietary to HP Inc
# and may be covered by U.S. and Foreign Patents, patents in p... | 0 |
2144.ps1 |
Describe "Redirection operator now supports encoding changes" -Tags "CI" {
BeforeAll {
$asciiString = "abc"
if ( $IsWindows ) {
$asciiCR = "`r`n"
}
else {
$asciiCR = [string][char]10
}
$SavedValue = $null
$oldDefa... | 0 |
sample_28_33.ps1 | ###
# ==++==
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 0 |
sample_23_92.ps1 | #
# Script module for module 'Az.ServiceBus' that is executed when 'Az.ServiceBus' is imported in a PowerShell session.
#
# Generated by: Microsoft Corporation
#
# Generated on: 05/16/2024 06:33:09
#
$PSDefaultParameterValues.Clear()
Set-StrictMode -Version Latest
function Test-DotNet
{
try
{
... | 0 |
sample_9_3.ps1 | #This Sample Code is provided for the purpose of illustration only and is not intended to be used in a production environment. THIS SAMPLE CODE AND ANY RELATED INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER #EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABI... | 0 |
sample_25_4.ps1 | #
# This script just calls the Add-AppDevPackage.ps1 script that lives next to it.
#
param(
[switch]$Force = $false,
[switch]$SkipLoggingTelemetry = $false
)
$scriptArgs = ""
if ($Force)
{
$scriptArgs = '-Force'
}
if ($SkipLoggingTelemetry)
{
if ($Force)
{
$scriptArgs +... | 0 |
sample_25_70.ps1 | <###################################################
# #
# Copyright (c) Microsoft. All rights reserved. #
# #
##################################################>
Import-Module -Name "$PSScriptRoot\..\RoleHelper... | 0 |
118.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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.