filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Set-Computername.ps1
function Set-ComputerName { param( [switch]$help, [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -computername AnewName" if ($help) {Write-Host $usage} $computer = Get-WmiObject Win32_ComputerSystem $computer.Rename($computerName) }
0
sample_47_81.ps1
--- # # Get VLANs for each Ethernet Network Policy # - name: Get VLANs for each Ethernet Network Policy hosts: localhost connection: local gather_facts: false vars: # Create an anchor for api_info that can be used throughout the file api_info: &api_info # if api_key vars are omitted, INTERSIGHT_AP...
0
sample_32_63.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # UnzipAndCopyMDS.ps1 # Kill all running Monitoring processes an...
0
1627.ps1
$subReddit = @( 'EarthPorn' 'SkyPorn' 'BotanicalPorn' 'waterporn' 'VillagePorn' 'Beachporn' 'lakeporn' ) $dstfile = "c:\reddit\wpp_$(date -f yyyyMMdd-HHmmss).jpg" if (!(Test-Path $(Split-Path $dstfile))...
0
sample_67_0.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
435.ps1
Register-PSFTeppArgumentCompleter -Command Export-PSFConfig -Parameter FullName -Name 'PSFramework-config-fullname' Register-PSFTeppArgumentCompleter -Command Export-PSFConfig -Parameter Module -Name 'PSFramework-config-module' Register-PSFTeppArgumentCompleter -Command Export-PSFConfig -Parameter Name -Name 'PSFramew...
0
2010.ps1
. "$psscriptroot/TestRunner.ps1" $assemblyName = "Microsoft.Management.Infrastructure.CimCmdlets" $excludeList = @() if ( $IsWindows ) { import-module CimCmdlets } Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList
0
1631.ps1
function Get-BitLockerInfo { param ( [string]$ComputerName = $env:COMPUTERNAME, [string]$PsExecPath = 'C:\pstools\psexec.exe' ) if (Test-Connection -ComputerName $ComputerName -Quiet -Count 2) { try{ $user = (Get-WmiObject -Class Win32_ComputerSystem -ComputerName...
0
sample_56_87.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_22_5.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. function Join-ScriptExtent { <# .EXTERNALHELP ..\PowerShellEditorServices.Commands-help.xml #> [CmdletBinding()] [OutputType([System.Management.Automation.Language.IScriptExtent])] param( [Parameter(Value...
0
sample_21_93.ps1
name: Setup Windows description: Set up for windows jobs inputs: cuda-version: description: which cuda version to install, 'cpu' for none required: true runs: using: composite steps: - name: Display EC2 information shell: bash run: | set -euo pipefail function get_ec2_me...
0
Is-Prime.ps1
######################################################################### # # Is-Prime # #Written by Tynen # ######################################################################### function Is-Prime{ param ($number) if($number -is [int] -or $number -is [long] -or $number -is [double] -or $number -is [sin...
0
sample_58_23.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
3008.ps1
if ($PSVersionTable.PSVersion.Major -le 2) { function Exit-CoverageAnalysis { } function Get-CoverageReport { } function Write-CoverageReport { } function Enter-CoverageAnalysis { param ( $CodeCoverage ) if ($CodeCoverage) { & $SafeCommands['Write-Error'] 'Code coverage anal...
0
Sort-Random.ps1
## Sort-Random.ps1 ## Shuffle pipeline input into a random order... ## Note that, as with any Sort- function, this is a natural holdup in your pipeline begin { $list = @() } process { $list += $_ } end { $r = new-object Random 1..$list.Count | % { $list[$r.Next(0,$list.Count-1)] } } ## There's ...
0
3f43dbaf-2e5c-4f5c-a244-776641571a20.ps1
function Get-RandomNames { <# .SYNOPSIS Gets Full Names from a List of Names from http://names.mongabay.com .DESCRIPTION Downloads the Names from the Websites and randomizes the order of Names and gives back an Object with surname, lastname and gender .PARAMETER MaxNames Number of names returned by the function ...
0
sample_18_96.ps1
if (![String]::IsNullOrEmpty($MergeCommitSha)) { $regexString = "(?mi)^commit[ ][a-z0-9]{40}\r\n^Author:[ ][^\r]+\r\n^Date:[ ]+[^\r]+(\r\n)+([ ]+[\u0020-\u007E]*\r\n)+\r\ndiff[ ]--git[ ][^\r]+\r\n[^-]+---[ ][^\r]+\r\n\+\+\+\s[^\r]+" $commitData_Capture = "(?mi)^commit[ ](?<sha>[a-z0-9]{40})\r\n(^Merge...
0
2247.ps1
[CmdletBinding(SupportsShouldProcess = $true)] param ( [parameter(Mandatory = $true, HelpMessage = "Specify the path containing the WinUPTP or Flash.cmd.")] [ValidateNotNullOrEmpty()] [string]$Path, [parameter(Mandatory = $false, HelpMessage = "Specify the BIOS password if necessary.")] [ValidateNotNullOrEmpty()]...
0
Services Auto NotRunning_1.ps1
#LazyWinAdmin.com Get-WmiObject Win32_Service -ComputerName . |` where {($_.startmode -like "*auto*") -and ` ($_.state -notlike "*running*")}|` select DisplayName,Name,StartMode,State|ft -AutoSize
0
sample_19_34.ps1
# # Module manifest for module 'OCI.PSModules.Redis' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Redis.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatible...
0
sample_63_82.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_5_96.ps1
ConvertFrom-StringData @' id_clustervalidationreport=Cluster Validation Report id_clustervalidationreportobtaining=Obtaining Cluster Validation Report id_clustervalidationreportstatus=Connecting to %Node% Service Control Manager id_clustervalidationreporttestnet=Testing Networking and obtaining Cluster Validation r...
0
2500.ps1
function SQL-Query{ param([string]$Query, [string]$SqlServer = $DEFAULT_SQL_SERVER, [string]$DB = $DEFAULT_SQL_DB, [string]$RecordSeparator = "`t") $conn_options = ("Data Source=$SqlServer; Initial Catalog=$DB;" + "Integrated Security=SSPI") $conn = New-Object System.Data.SqlClient.SqlConnection($conn_opt...
0
ExportSQLDeadlockGraphs.ps1
<# ALZDBA SQLServer_Export_DeadlockGraphs_SMO.ps1 Export top n Deadlock graphs for all databases of a given SQLServer (SQL2008+) Instance results in a number of .XDL files and one overview file *AllDbDeadlockGraphs.csv. Double clicking an .XDL file will open the graphical representation of the deadlock info in SQ...
0
sample_55_29.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEditi...
0
sample_38_71.ps1
#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" $pathsep=":" $env_node_path=$env:NODE_PATH $new_node_path="C:\Users\abder\component-maker\web\node_modules\.pnpm\jiti@1.21.0\node_modules\jiti\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\jiti@1.21.0\no...
0
2431.ps1
[CmdletBinding()] [OutputType('System.Management.Automation.PSCustomObject')] param ( [Parameter(Mandatory, ValueFromPipeline, ValueFromPipelineByPropertyName)] [ValidateScript({Test-Connection -ComputerName $_ -Quiet -Count 1})] [string]$Computername, [Parameter()] [int]$RetryInterval = 10 ) begin { $Er...
0
Get-FileEncoding_3.ps1
<# .SYNOPSIS Gets file encoding. .DESCRIPTION The Get-FileEncoding function determines encoding by looking at Byte Order Mark (BOM). Based on port of C# code from http://www.west-wind.com/Weblog/posts/197245.aspx .EXAMPLE Get-ChildItem *.ps1 | select FullName, @{n='Encoding';e={Get-FileEncoding $_.FullName}} | ...
0
932.ps1
$apiVersion = "2015-04-08" $resourceGroupName = "myResourceGroup" $accountName = "mycosmosaccount" $tableName = "table1" $accountResourceName = $accountName + "/table/" $tableResourceName = $accountName + "/table/" + $tableName $tableResourceType = "Microsoft.DocumentDb/databaseAccounts/apis/tables" Read-Host -Pro...
0
1721.ps1
function Remove-ServiceNowTableEntry{ [CmdletBinding(ConfirmImpact='High')] Param( [parameter(mandatory=$true)] [parameter(ParameterSetName='SpecifyConnectionFields')] [parameter(ParameterSetName='UseConnectionObject')] [parameter(ParameterSetName='SetGlobalAuth')] [...
0
sample_47_84.ps1
# Localized 06/28/2023 07:58 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Troubleshooting Troubleshoot_DetectDVDDevice=Checking DVD device ... Troubleshoot_DetectDVDvideoDecoder=Checking video decoder for DVD playback ... Troubleshoot_DetectDVDAudioDecoder...
0
out-form with sort colum.ps1
I think OUT-FORM is a very usefull function. I've added code to sort columns by clicking on headers. You nedd just add the columnTag parameters specifing if colunm value is text or numeric: out-form -data (get-process) -columnNames ("Name", "ID" ) -columnProperties ("Name", "ID") -columnTag ("Text", "Numeric") ...
0
sample_2_0.ps1
#jc jclauzel edited as part of SDP to TSS migration 17/02/2023 # Last Modified: 2023-02-24 by #we# $debug = $false # Load Common Library: . ./utils_cts.ps1 . ./utils_MBS.ps1 . ./utils_CRM.ps1 $CRMServerNotInstalledTitle="Microsoft Dynamics CRM Server Not Installed." $CRMServerNotInstalledDescription = "Th...
0
sample_0_22.ps1
ConvertFrom-StringData @' id_sepprocesshandleleak_sd=A specific version of Symantec Endpoint Protection (SEP) known for causing handle leaks was detected in this machine. '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYC...
0
1673.ps1
function Setup-Network { param ( [switch]$dhcp, $ip, $mask, $gateway, $dns1, $dns2 ) $admin = reg query "HKU\S-1-5-19\Environment" 2>&1 if ($admin -match 'denied') { Throw 'You are not admin' } if (!$dhcp -and !$ip) { Throw 'Must specify I...
0
943.ps1
$uniqueId=$(-join ((97..122) + (48..57) | Get-Random -Count 15 | % {[char]$_})) $apiVersion = "2015-04-08" $location = "West US 2" $resourceGroupName = "myResourceGroup" $accountName = "mycosmosaccount-$uniqueId" $accountResourceType = "Microsoft.DocumentDb/databaseAccounts" $databaseResourceType = "Microsoft.Doc...
0
sample_10_87.ps1
#************************************************ # TS_4KDriveInfo.ps1 # Version 1.0.2 # Date: 03-21-2011 # Author: Andre Teixeira - andret@microsoft.com # Description: This script detects 4KB/ 512e drive informaiton #************************************************ # 2023-02-20 WalterE mod Trap #we# trap [Exce...
0
694.ps1
function Get-FileExtension { param( [Parameter(Mandatory=$True)] [string]$TypeName ) switch ($TypeName) { 'Report' { return '.rdl' } 'DataSource' { return '.rsds' } 'DataSet' { return '.rsd' } 'MobileReport' { return '.rsmobile' } 'PowerBIRe...
0
sample_4_19.ps1
ConvertFrom-StringData @' id_rdsserverprogress=Gathering RDS Information: id_rdswmiget=Getting Win32_TerminalServiceSetting from WMI. id_rdswmigeterror=ERROR: WMI not working. unable to get Win32_TerminalServiceSetting. id_rdswmigetsolution=Please verify that WMI service running using wbemtest. id_rdsiis=Getting I...
0
sample_5_45.ps1
ConvertFrom-StringData @' id_veritasvxiobadconfigflags_sd=VXIO device has a bad state flag and this may cause shadown copies of Veritas volumes to fail. '@ # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE...
0
sample_36_53.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 = '83.1.0' # Sup...
0
sample_34_95.ps1
using namespace System.Management.Automation using namespace System.Management.Automation.Language # This is an example profile for PSReadLine. # # This is roughly what I use so there is some emphasis on emacs bindings, # but most of these bindings make sense in Windows mode as well. Import-Module PSReadLine ...
0
685.ps1
function Set-RsDatabaseCredentials { [cmdletbinding(SupportsShouldProcess = $true, ConfirmImpact = 'High')] param( [Parameter(Mandatory = $true)] [Alias('Authentication')] [Microsoft.ReportingServicesTools.SqlServerAuthenticationType] $DatabaseCredentialType, [Sy...
0
sample_27_16.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_63_98.ps1
# # Module manifest for module 'OCI.PSModules.Goldengate' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Goldengate.dll' # Version number of this module. ModuleVersion = '86.2.0' # Supported PSEditions ...
0
sample_47_10.ps1
@{ GUID="eb74e8da-9ae2-482a-a648-e96550fb8733" Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="© Microsoft Corporation. All rights reserved." Description='PowerShell module for working with ZIP archives.' ModuleVersion="1.2.5" PowerShellVersion="3.0" FunctionsToExport = @('Compress...
0
sample_16_54.ps1
# # Module manifest for module 'OCI.PSModules.Osmanagement' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osmanagement.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditi...
0
8e2c5f39-6676-4cb0-bdac-6f8819060c49.ps1
#------------------------------------------------------------------------------ # # get the 'connect' entries from the logs of all the Exchange CAS servers # only keep the last 30 days # # runs at 2AM #------------------------------------------------------------------------------ Function Get-ClientVersionC...
0
sample_42_94.ps1
# # Module manifest for module 'OCI.PSModules.Devops' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Devops.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatib...
0
3025.ps1
function New-Fixture { param ( [String]$Path = $PWD, [Parameter(Mandatory = $true)] [String]$Name ) $Name = $Name -replace '.ps1', '' $scriptCode = "function $Name {$([System.Environment]::NewLine)$([System.Environment]::NewLine)}" $testCode = '$here = Spli...
0
sample_11_59.ps1
#$debug = $false # Load Common Library: . ./utils_cts.ps1 # Load DSD Common Function Library . ./utils_DSD.ps1 trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo...
0
1929.ps1
Import-Module HelpersCommon Describe "Set-Date for admin" -Tag @('CI', 'RequireAdminOnWindows', 'RequireSudoOnUnix') { It "Set-Date should be able to set the date in an elevated context" -Skip:(Test-IsVstsLinux) { { Get-Date | Set-Date } | Should -Not -Throw } It "Set-Date should be a...
0
3367.ps1
param( [string] $RootPath = "$PSScriptRoot\..\src", [string] $OutputFile = "$PSScriptRoot\groupMapping.json", [string] $WarningFile = "$PSScriptRoot\groupMappingWarnings.json", [string] $RulesFile = "$PSScriptRoot\CreateMappings_rules.json" ); $rules = Get-Content -Raw -Path $RulesFile | ConvertFro...
0
sample_58_56.ps1
# # Module manifest for module 'OCI.PSModules.Events' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Events.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions Compatib...
0
Get-Computer.ps1
function Get-Computer { <# .Synopsis Retrieves basic information about a computer. .Description The Get-Computer cmdlet retrieves basic information such as computer name, domain or workgroup name, and whether or not the computer is on a workgroup or a domain for the local computer. .Exa...
0
sample_39_48.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 = '83.2.0' #...
0
454.ps1
Register-PSFConfigValidation -Name "psframework.logfilefiletype" -ScriptBlock { Param ( $Value ) $Result = New-Object PSObject -Property @{ Success = $True Value = $null Message = "" } try { [PSFramework.Logging.LogFileFileType]$type = $Value } catch { $Result.Message = "Not a logfile file typ...
0
sample_30_54.ps1
# # Module manifest for module 'OCI.PSModules.Devops' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Devops.dll' # Version number of this module. ModuleVersion = '75.1.0' # Supported PSEditions Compatib...
0
sample_34_18.ps1
ConvertFrom-StringData @' ###PSLOC MissingRequiredParameter = Parameter '{0}' not found on command line or in configuration file : {1} MalformedRequiredParameter = Parameter '{0}' value '{1}' does not match expected format '{2}' ADOUPathDescription = Organizational Unit (OU) for the HCI deployment must be specified...
0
3202.ps1
function New-SqlConnection { [cmdletbinding()] [OutputType([System.Data.SqlClient.SQLConnection])] param( [Parameter( Position=0, Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, Valu...
0
sample_36_80.ps1
# # Module manifest for module 'OCI.PSModules.Adm' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Adm.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEd...
0
View-Process_v2.ps1
function View-Process(){ param( [string[]]$ComputerNames, [string[]]$ProcessNames, $User ) if ($User -is [String]){ $Connection = Get-Credential -Credential $User } if ($ProcessNames -eq $null){ if ($Connection -eq $null){ foreach ($int1 in $ComputerNames){ $View_Process = gwmi "win32_pro...
0
Backup-DatabaseObject.ps1
add-type -AssemblyName "Microsoft.SqlServer.ConnectionInfo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" add-type -AssemblyName "Microsoft.SqlServer.Smo, Version=10.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" add-type -AssemblyName "Microsoft.SqlServer.SMOExtended, Version=10.0.0.0...
0
Get-Field_1.ps1
function Get-Field{ [CmdletBinding()] param ( [Parameter(Position=0,Mandatory=$true)] $InputObject ) $publicNonPublic = [Reflection.BindingFlags]::Public -bor [Reflection.BindingFlags]::NonPublic $instance = $publicNonPublic -bor [Reflection.BindingFlags]::Instance $getField = $instance -bor [Re...
0
sample_44_3.ps1
/* eslint-disable no-undef */ var plugin = require("plugin-vs-v2"); if (typeof plugin != "undefined") { plugin.Messaging.addEventListener("pluginready", function () { setHtmlText(); }); } function setHtmlText() { // resource strings used by docker.web.default.html setTextContent("#dockerWebCor...
0
sample_29_40.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
3110.ps1
function Get-WindowsProductKey { [CmdletBinding()] param( [Parameter( Position=0, HelpMessage='ComputerName or IPv4-Address of the remote computer')] [String[]]$ComputerName = $env:COMPUTERNAME, [Parameter( Position=1, HelpMessage='Credentials to authenticate agains a remote computer')] ...
0
chkhash_26.ps1
# calculate SHA512 of file. function Get-SHA512([System.IO.FileInfo] $file = $(throw 'Usage: Get-MD5 [System.IO.FileInfo]')) { $stream = $null; $cryptoServiceProvider = [System.Security.Cryptography.SHA512CryptoServiceProvider]; $hashAlgorithm = new-object $cryptoServiceProvider $stream = $file.Open...
0
sample_44_86.ps1
# # Module manifest for module 'OCI.PSModules.Waa' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waa.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_50_75.ps1
# Localized 05/08/2024 05:10 AM (GMT) 303:7.1.41104 Add-AppDevPackage.psd1 # Culture = "en-US" ConvertFrom-StringData @' ###PSLOC PromptYesString=&Tak PromptNoString=&Nie BundleFound=Znaleziono pakiet: {0} PackageFound=Znaleziono pakiet: {0} EncryptedBundleFound=Znaleziono zaszyfrowany zbiór: {0} EncryptedPac...
0
USB Script backup_2.ps1
<# .SYNOPSIS Backup-ToUSB.ps1 (Version 2.2, 9 Jan 2012) .DESCRIPTION This script will backup recently changed *.ps1,*.psm1,*.psd1 files from any selected folder (default is $pwd) to any number of inserted USB devices, on which an archive folder 'PSarchive' will be created if it does not already exist. As a U...
0
2296.ps1
Write-Host -NoNewLine "Enter the path to the MDT Deployment Share (E.g `"\\util01\mdt$`" or `"Z:\`"): " $share = Read-Host Write-Progress -Activity "Driver Scan..." -PercentComplete 0 -Status "Gathering list of devices on this PC..." $devices = (Get-PnpDevice).HardwareID; $devices_list = New-Object -TypeName "System.Co...
0
3605.ps1
function Get-PSResourceGroupName { return Get-DeviceResourceGroupName } function Get-PSDeviceName { return getAssetName } function Test-GetDeviceNonExistent { $rgname = Get-PSResourceGroupName $dfname = Get-PSDeviceName Assert-ThrowsContains { Get-AzDataBoxEdgeDevice $rgname $dfname } "not fo...
0
sample_4_69.ps1
#************************************************ # Rule ID 29 from http://sharepoint/sites/diag/Rules/_layouts/listform.aspx?PageType=4&ListId=%7b1F944AAF-10B3-4442-8AA8-4A1EF2B0F5F8%7d&ID=29&ContentTypeID=0x0100969570CC59987E4BADAD7118A311DB4D #************************************************ # TS_ClusterCNOCheck....
0
Powershell $ UIA.ps1
$path = "$env:programfiles\\Reference Assemblies\\Microsoft\\Framework\\v3.0" $TypesAssembly = [Reflection.Assembly]::LoadFile("$path\\UIAutomationTypes.dll") $ClientAssembly = [Reflection.Assembly]::LoadFile("$path\\UIAutomationClient.dll") $NS = "System.Windows.Automation" [System.Diagnostics.Process]::Start(...
0
sample_30_26.ps1
# # Module manifest for module 'Az.ApplicationInsights' # # Generated by: Microsoft Corporation # # Generated on: 23/04/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.ApplicationInsights.psm1' # Version number of this module. ModuleVersion = '2.2.5' #...
0
1783.ps1
Function Install-ModuleIfMissing { param( [parameter(Mandatory)] [String] $Name, [version] $MinimumVersion, [switch] $SkipPublisherCheck, [switch] $Force ) $module = Get-Module -Name $Name -ListAvailable -ErrorAction Ignore | Sort-Ob...
0
4356.ps1
function Validate-VersionParameters { [CmdletBinding()] Param( [parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [System.Management.Automation.PSCmdlet] $CallerPSCmdlet, [Parameter()] [String[]] $Name, [Parameter()] [string] ...
0
sample_1_65.ps1
#************************************************ # TS_AdapterKB980486Check.ps1 # Version 1.0 # Date: 11-8-2011 # Author: v-anecho # Description: It was detected that the number of 6to4 adapters exceeded the number of physical network adapters on this computer. This may be a symptom of the issue described in KB98...
0
SharpSsh Functions.ps1
## USING the binaries from: ## http://downloads.sourceforge.net/sharpssh/SharpSSH-1.1.1.13.bin.zip [void][reflection.assembly]::LoadFrom( (Resolve-Path "~\\Documents\\WindowsPowerShell\\Libraries\\Tamir.SharpSSH.dll") ) ## NOTE: These are bare minimum functions, and only cover ssh, not scp or sftp ## also, ...
0
307.ps1
function Register-PSFTeppArgumentCompleter { [CmdletBinding(HelpUri = 'https://psframework.org/documentation/commands/PSFramework/Register-PSFTeppArgumentCompleter')] Param ( [Parameter(Mandatory = $true)] [string[]] $Command, [Parameter(Mandatory = $true)] [string[]] $Parameter, [Parameter(M...
0
Inventory_2.ps1
##############################################################################\n##\n## Inventory\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\nServes as the ...
0
627.ps1
param( [string]$Version, [string]$Path, [switch]$Force, $Update, [switch]$Uninstall ) $Configs = @{ Version = "1.1.2" Url = "http://freefr.dl.sourceforge.net/project/windirstat/windirstat/1.1.2%20installer%20re-release%20%28more%20languages%21%29/windirstat1_1_2_setup.exe" Path = "$(Split-Path -Path $My...
0
3744.ps1
Param( [Parameter(Mandatory=$true, Position=0)] [string] $TestRunNameSpace, [Parameter(Mandatory=$false, Position=1)] [string] $Vault = "", [Parameter(Mandatory=$false, Position=2)] [string] $StorageResourceId = $null ) . (Join-Path $PSScriptRoot "..\..\..\..\Common\Commands.ScenarioTests.Commo...
0
sample_16_84.ps1
Import-Module $PSScriptRoot\AzStackHci.EnvironmentChecker.Reporting.psm1 -Force -DisableNameChecking -Global Import-Module $PSScriptRoot\AzStackHci.EnvironmentChecker.PortableUtilities.psm1 -Force -DisableNameChecking -Global Import-LocalizedData -BindingVariable lTxt -FileName AzStackHci.EnvironmentChecker.Strings...
0
sample_26_73.ps1
import t from"./javascript-202a59bf.js";import e from"./css-d17117ca.js";const n=Object.freeze({displayName:"HTML",injections:{"R:text.html - (comment.block, text.html meta.embedded, meta.tag.*.*.html, meta.tag.*.*.*.html, meta.tag.*.*.*.*.html)":{comment:"Uses R: to ensure this matches after any other injections.",pat...
0
5a74e43a-a30a-486b-a5a6-349644cb654a.ps1
#You'll need admin perms on all the servers to run this... Write-Host "ComputerName in White, then Local Groups in Green, Local Groups' Members in White" #This feeds the script a list of server names (ServerList.txt, placed in the same directory) #for which I want the Local Groups and all those groups' Members. ...
0
3311.ps1
function Get-CommandHistory { [PoshBot.BotCommand( Aliases = ('history'), Permissions = 'manage-plugins' )] [cmdletbinding(DefaultParameterSetName = 'all')] param( [parameter(Mandatory)] $Bot, [parameter(Position = 0, ParameterSetName = 'name')] [st...
0
sample_14_93.ps1
ConvertFrom-StringData @' id_proliantdl385nmicrashdump_sd=NMICrashDump is set to 1 on this HP ProLiant DL385 G5. This setting may block machine dumps via NMI to be generated. '@ # SIG # Begin signature block # MIIoVQYJKoZIhvcNAQcCoIIoRjCCKEICAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEe...
0
sample_40_21.ps1
#======================================================================================================================================================================= # Copyright (c) Microsoft Corporation. All rights reserved. # # Description: # RemoveMDS.ps1 # Kill all Monitoring processes and clean up tra...
0
sample_36_76.ps1
# # Module manifest for module 'OCI.PSModules.Networkfirewall' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Networkfirewall.dll' # Version number of this module. ModuleVersion = '81.0.0' # Supported P...
0
sample_30_98.ps1
# escape=` # ----------------------------------------------------------------------------------------- # This file describes the standard way to build Docker in a container on Windows # Server 2016 or Windows 10. # # Maintainer: @jhowardmsft # ---------------------------------------------------------------------------...
0
1680.ps1
Function Test-RPC { [CmdletBinding(SupportsShouldProcess=$True)] Param([Parameter(ValueFromPipeline=$True)][String[]]$ComputerName = 'localhost') BEGIN { Set-StrictMode -Version Latest $PInvokeCode = @' using System; using System.Collections.Generic; using Syst...
0
sample_24_27.ps1
<# .SYNOPSIS Demonstrates how to write a command that works with paths that allow wildards and must exist. .DESCRIPTION This command also demonstrates how you need to supply a LiteralPath parameter when your Path parameter accepts wildcards. This is in order to handle paths like foo[1].txt. ...
0
sample_2_4.ps1
#************************************************ # DC_NfsClient-Component.ps1 # Version 1.0.06.26.14: Created script. # Version 1.1.08.14.14: Updated comments. TFS264083 # Date: 2014 # Author: Boyd Benson (bbenson@microsoft.com) # Description: Collects information about NFS Client. # Called from: Main Networkin...
0
sample_23_1.ps1
param ( [Parameter(Mandatory = $true)] [PSObject] $Session ) # Export Certificate Invoke-Command -Session $Session -ScriptBlock { param() try { function Set-FolderPermissions([string]$folder, [string]$account) { Write-Host "Adding permissions to folder '$folder'" ...
0
sample_59_23.ps1
# # Module manifest for module 'Az.FrontDoor' # # Generated by: Microsoft Corporation # # Generated on: 7/4/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.FrontDoor.psm1' # Version number of this module. ModuleVersion = '1.11.1' # Supported PSEditions...
0
3174.ps1
function Get-ADSIObject { [cmdletbinding(DefaultParameterSetName='SAM')] Param( [Parameter( Position=0, Mandatory = $true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, ParameterSetName='SAM')] ...
0
sample_32_92.ps1
@{ GUID = "1DA87E53-152B-403E-98DC-74D7B4D63D59" Author = "PowerShell" CompanyName = "Microsoft Corporation" Copyright = "Copyright (c) Microsoft Corporation." ModuleVersion = "7.0.0.0" CompatiblePSEditions = @("Core") PowerShellVersion = "3.0" CmdletsToExport = @( 'Export-Alias', 'Get-Alias', 'Import-Alias'...
0
3960.ps1
function Test-VirtualNetworkExpressRouteGatewayCRUD { $rgname = Get-ResourceGroupName $rname = Get-ResourceName $domainNameLabel = Get-ResourceName $vnetName = Get-ResourceName $publicIpName = Get-ResourceName $vnetGatewayConfigName = Get-ResourceName $rglocation = Get-Provi...
0