filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
3002.ps1
function Get-HumanTime($Seconds) { if ($Seconds -gt 0.99) { $time = [math]::Round($Seconds, 2) $unit = 's' } else { $time = [math]::Floor($Seconds * 1000) $unit = 'ms' } return "$time$unit" } function GetFullPath ([string]$Path) { $Folder = & $SafeCommands['Split...
0
1665.ps1
Write-Host 'Gathering Stats, Please Wait..' $Mailboxes = Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName, Identity, ArchiveStatus $index = 0 $total = @($Mailboxes).Count $starttime = $lasttime = Get-Date $MailboxSizes = foreach ($Mailbox in $Mailboxes) { $index++ $currtime = (Get-Date) - $sta...
0
2302.ps1
[CmdletBinding()] param ( [Parameter(Mandatory)] [ValidateScript({Test-Connection -ComputerName $_ -Quiet -Count 1 })] [string[]]$Computername, [string]$LogFilePath = 'C:\MyLog.log', [string]$SmtpServer = 'mail.domain.com', [string]$EmailFrom = 'notifications@domain.local', [string]$EmailSubject = 'New Local Ad...
0
2468.ps1
[CmdletBinding()] param ( [Parameter(Mandatory, ValueFromPipeline)] [string[]]$AzureVM, [string]$ServiceName = 'ADBCLOUD', [switch]$Overwrite ) begin { Set-StrictMode -Version Latest try { $AzureModuleFilePath = "$($env:ProgramFiles)\Microsoft SDKs\Windows Azure\PowerShell\ServiceManagement\Azure\Azure.psd1...
0
sample_7_95.ps1
# Queries EDP WNFs to get current configuration state. # param($scriptOutputPath, $scriptmode) $logpath = $scriptOutputPath + "\\" + $scriptmode + "EdpState.log" Add-Content -Path $logpath -Value ($scriptmode + ": Log EDP config info") # WNF (and other) p/invoke types. Add-Type -Path ($PSScriptRoot + "\\edput...
0
sample_17_5.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 = '74.1.0' # Supported...
0
Script-Object.ps1
#Copyright (c) 2011 Justin Dearing # #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the rights #to use, copy, modify, merge, publish, dist...
0
ScheduledTasks.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_59_83.ps1
# # Module manifest for module 'OCI.PSModules.Filestorage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Filestorage.dll' # Version number of this module. ModuleVersion = '85.1.0' # Supported PSEdition...
0
2117.ps1
Describe 'Line endings' -Tags "CI" { BeforeAll { $lf = "`n" $cr = "`r" $crlf="`r`n" $dq = "`"" $sq = "'" $hereDB = "@`"" $hereDE = "`"@" $hereSB = "@'" $hereSE = "'@" } $testData = @( @{ Name = 'CR in single q...
0
1391.ps1
function Disable-CNtfsCompression { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter(Mandatory=$true,ValueFromPipeline=$true,ValueFromPipelineByPropertyName=$true)] [Alias('FullName')] [string[]]$Path, [Switch]$Recurse, [sw...
0
949.ps1
$apiVersion = "2015-04-08" $resourceGroupName = "myResourceGroup" $accountName = "mycosmosaccount" $keyspaceName = "keyspace1" $tableName = "table1" $keyspaceThroughputResourceType = "Microsoft.DocumentDb/databaseAccounts/apis/keyspaces/settings" $keyspaceThroughputResourceName = $accountName + "/cassandra/" + $keyspa...
0
Get-StructFromMemory.ps1
function Get-StructFromMemory { <# .SYNOPSIS Marshals data from an unmanaged block of memory in an arbitrary process to a newly allocated managed object of the specified type. Author: Matthew Graeber (@mattifestation) License: BSD 3-Clause .DESCRIPTION Get-StructFromMemory is similar to the Marshal.Ptr...
0
Split-Every Function.ps1
Function Split-Every($list, $count=4) { $aggregateList = @() $blocks = [Math]::Floor($list.Count / $count) $leftOver = $list.Count % $count for($i=0; $i -lt $blocks; $i++) { $end = $count * ($i + 1) - 1 $aggregateList += @(,$list[$start..$end]) $start = $en...
0
1640.ps1
function Get-LocalAdmin { param ( $comp = $env:COMPUTERNAME, [ValidateSet('AccountManagement', 'ADSI', 'WMI')] $method = 'ADSI', [ValidateSet('Administrators', 'Remote Desktop Users')] $groupname = 'Administrators' ) if ($method -eq 'Accou...
0
XC_SMTPFunctions.ps1
param( [Parameter(Position=0,ValueFromPipeline=$True)] [ValidateNotNullorEmpty()][string[]]$Mailboxes = @(), [string] $Regex = "domain\\.local$|^CCMAIL|^MS:COMPREGION", $SMTPdomains = @("domain.com","sub.domain.com"), $Delimiter = "|", $OutputLog = "C:\\Projects\\XC\\smtpadresses.csv", [switch] $Output, [switch...
0
4174.ps1
[CmdletBinding()] param ( [string]$DirectoryExclusionsFile = 'DirectoryExclusions.txt', [string]$FileExclusionsFile = 'FileExclusions.txt', [string]$RobocopySwitches = '/e /eta /r:1 /w:0 /TEE /MIR', [ValidateNotNullOrEmpty()][string]$DestinationUNC = '\\profiles\userprofiles' ) function Get-RelativePath { [Cmd...
0
2779.ps1
[CmdletBinding()] Param( [Parameter(Mandatory=$True,Position=0)] [String]$Path ) $files = ls -r $Path | ? { $_.Name -match ".*\-.*" } $files | Select-Object BaseName, Length | Sort-Object Length | ConvertTo-Csv -Delimiter "`t"
0
sample_21_24.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ ## ## TODO: Refactor the cer...
0
sample_64_39.ps1
# # Module manifest for module 'OCI.PSModules.Threatintelligence' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Threatintelligence.dll' # Version number of this module. ModuleVersion = '83.3.0' # Suppo...
0
sample_57_80.ps1
# # Module manifest for module 'OCI.PSModules.Usage' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Usage.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEditions Compatible...
0
sample_54_40.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ param ( [Parameter(Manda...
0
sample_52_13.ps1
# Localized 05/07/2022 03:58 AM (GMT) 303:7.0.30723 RunAsHelper.strings.psd1 # Localized resources for RunAsHelper ConvertFrom-StringData @' ###PSLOC ErrorInvalidUserName=UserName {0} is not valid. UserCouldNotBeLoggedError=The user could not be logged on. Ensure that the user has an existing profile on the mac...
0
sample_52_34.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> <# .DESCRIPTION This function takes the config...
0
2819.ps1
if (Get-Command logparser.exe) { $lpquery = @" SELECT COUNT(Type, Subtype, Data) as ct, ServiceName, Action, Type, Subtype, Data FROM *svctrigs.tsv GROUP BY ServiceName, Action, Type, Subtype, Dat...
0
2591.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($...
0
sample_16_78.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdition...
0
2617.ps1
param([string[]]$SqlNodes) Configuration SQLServer{ param([string[]] $ComputerName) Import-DscResource -Module xNetworking Import-DscResource –ModuleName 'PSDesiredStateConfiguration' Node $ComputerName { File DataDir{ DestinationPath = 'C:\DBFiles\Data' Type = ...
0
sample_61_1.ps1
# # This script handles common telemetry tasks for Install.ps1 and Add-AppDevPackage.ps1. # function IsVsTelemetryRegOptOutSet() { $VsTelemetryRegOptOutKeys = @( "HKLM:\SOFTWARE\Policies\Microsoft\VisualStudio\SQM", "HKLM:\SOFTWARE\Wow6432Node\Microsoft\VSCommon\16.0\SQM", "HKLM:\S...
0
BER Encoding Module.ps1
<# .SYNOPSIS BER encoding library .DESCRIPTION Takes ASN types integer, octet (string), octet (byte array), and OID (string) values and encodes into byte array using Basic Encoding Rules (BER) BER encoding is used for SNMP, X.509 certificates, etc. There will be a companion BER decoding l...
0
sample_50_3.ps1
## Copyright (c) Microsoft Corporation. All rights reserved. <# .SYNOPSIS This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. .DESCRIPTION This cmdlet collects a performance recording of Microsoft Defender Antivirus scans. These performance recordings contain Microsoft-Antimal...
0
sample_48_68.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\typescript@5.3.3\node_modules\typescript\bin\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\typ...
0
sample_15_25.ps1
# 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 directory path. InvalidZipFileExtensionError={0} is not a supported archive...
0
sample_7_41.ps1
ConvertFrom-StringData @' id_printsettmpsystem32check_st=One or more TMP file found under system32 folder and this may cause problems to install printer drivers '@ # SIG # Begin signature block # MIIoLQYJKoZIhvcNAQcCoIIoHjCCKBoCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8...
0
sample_59_73.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
Debug Regex match_1.ps1
function Debug-Regex { <# .SYNOPSIS A very simple function to debug a Regex search operation and show any 'Match' results. (V2.1 Export Alias db & some patterns, 28 Jan 2012). .DESCRIPTION Sometimes it is easier to correct any regex usage if each match can be shown in context. This function will show each su...
0
sample_26_86.ps1
# # Module manifest for module 'OCI.PSModules.Budget' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Budget.dll' # Version number of this module. ModuleVersion = '74.1.0' # Supported PSEditions Compatib...
0
2011.ps1
. "$psscriptroot/TestRunner.ps1" $assemblyName = "Microsoft.PowerShell.Security" $excludeList = @("SecurityMshSnapinResources.resx") import-module Microsoft.PowerShell.Security Test-ResourceStrings -AssemblyName $AssemblyName -ExcludeList $excludeList
0
2482.ps1
[CmdletBinding()] [OutputType()] param ( [Parameter(Mandatory)] [ValidateNotNullOrEmpty()] [string]$Class, [Parameter()] [ValidateNotNullOrEmpty()] [string[]]$ComputerName = $env:COMPUTERNAME, [Parameter()] [ValidateNotNullOrEmpty()] [pscredential]$Credential, [Parameter()] [ValidateNotNullOrEmpty()...
0
sample_36_65.ps1
# Inspired by https://eslint.org/docs/rules/brace-style#stroustrup @{ IncludeRules = @( 'PSPlaceOpenBrace', 'PSPlaceCloseBrace', 'PSUseConsistentWhitespace', 'PSUseConsistentIndentation', 'PSAlignAssignmentStatement', 'PSUseCorrectCasing' ) Rules = @{ ...
0
3509.ps1
$global:resourceType = "Microsoft.IoTCentral/IotApps" function Test-IotCentralAppLifecycleManagement{ $rgname = Get-ResourceGroupName $rname = Get-ResourceName $subdomain = ($rname) + "subdomain" $location = Get-Location "Microsoft.IoTCentral" "IotApps" $sku = "S1" $displayName = "Custom Io...
0
Split-TextToLines Demo_2.ps1
# Variables $viserver = Read-Host "Enter VI server name" $cluster = Read-Host "Enter Cluster name" $vmhelper = Read-Host "Enter VM_HELPER name" Write-Host "Connecting to $viserver..." Connect-VIServer $viserver -WarningAction:SilentlyContinue # Get VM Hosts $vmhosts = Get-Cluster $cluster -ErrorAction:Silent...
0
Findup_22.ps1
using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Security.Cryptography; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System.Text.RegularExpressions; namespace Findup { public class FileLengthComparer : I...
0
Disable-CopyPasta-1.ps1
Begin { $disableCopy = "isolation.tools.copy.enable" $disableCopy_value = "false" $disablePaste = "isolation.tools.paste.enable" $disablePaste_value = "false" $disableGUI = "isolation.tools.setGUIOptions.enable" $disableGUI_value = "false" } Process { #Ma...
0
3488.ps1
function Test-ScriptActionRelatedCommands{ try { $cluster = Create-Cluster $scriptActionName = Generate-Name("scriptaction") $uri = "https://hdiconfigactions.blob.core.windows.net/linuxhueconfigactionv02/install-hue-uber-v02.sh" $nodeTypes = ("Worker") $script = Submit-AzHDIns...
0
sample_54_83.ps1
<############################################################# # # # Copyright (C) Microsoft Corporation. All rights reserved. # # # #############################################################> ...
0
4031.ps1
function Test-AzureLocation { $providerLocations = Get-AzLocation Assert-True { $providerLocations.Count -gt 0 } foreach ($location in $providerLocations) { Assert-True { $location.Providers.Count -gt 0 } } }
0
sample_34_93.ps1
# escape=` ARG base_image FROM ${base_image} # https://www.thomasmaurer.ch/2019/07/how-to-install-and-update-powershell-7/ # Wrapping the following command in cmd.exe # iex "& { $(irm https://aka.ms/install-powershell.ps1) } -UseMSI -Quiet" RUN powershell -ExecutionPolicy RemoteSigned -Command "$ErrorActionPreference...
0
Start-Verify.ps1
# Author: Steven Murawski http://www.mindofroot.com # This script creates two functions (and a helper function). One starts logging all commands entered, # and the second removes the logging. # This script is similar to the Start-Transcript, but only logs the command line and not the output. function New-Scr...
0
sample_56_1.ps1
# # Module manifest for module 'OCI.PSModules.Streaming' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Streaming.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions Co...
0
Audit Script.ps1
##################################################### # Audit script by Alan Renouf - Virtu-Al # # Blog: http://teckinfo.blogspot.com/ # # # # Usage: Audit.ps1 'path' # # ...
0
sample_57_49.ps1
########################################################################## # DELL PROPRIETARY INFORMATION # # This software is confidential. Dell Inc., or one of its subsidiaries, has supplied this # software to you under the terms of a license agreement,nondisclosure agreement or both. # You may not copy, disclose, o...
0
3104.ps1
param( [string]$buildCorePowershellUrl = "https://opbuildstorageprod.blob.core.windows.net/opps1container/.openpublishing.buildcore.ps1", [string]$parameters ) $errorActionPreference = 'Stop' echo "download build core script to local with source url: $buildCorePowershellUrl" $repositoryRoot = Split-Path -Par...
0
List AD Computers XLS.ps1
# Create a new Excel object using COM $Excel = New-Object -ComObject Excel.Application $Excel.visible = $True # WMI Class variables $WMI_CSP = "Win32_ComputerSystemProduct" $WMI_CS = "Win32_ComputerSystem" $WMI_Disk = "Win32_LogicalDisk" $WMI_OS = "Win32_OperatingSystem" $WMI_Proc = "Win32_Processor" # Set...
0
sample_22_59.ps1
# region Generated # Load the private module dll $null = Import-Module -PassThru -Name (Join-Path $PSScriptRoot '..\bin\Az.DevCenterdata.private.dll') # Load the internal module $internalModulePath = Join-Path $PSScriptRoot '..\internal\Az.DevCenterdata.internal.psm1' if(Test-Path $internalModulePath)...
0
Help Differ 10000 v0.01.ps1
# These functions are meant to help generate a table that shows differences between # cmdlets among different versions of a module. # You will need a MoinMoin wiki to render the output. # If you don't have a MoinMoin wiki you might be able to use the sandbox at http://moinmo.in/WikiSandBox # Extracts some data fr...
0
Get-Help.ps1
#function get-help() {\ncmdlet -DefaultParameterSet AllUsersView `\n\nparam(\n [Parameter(Position=0, ValueFromPipelineByPropertyName=$true)]\n [System.String]\n $Name,\n\n [ValidateSet("Alias","Cmdlet","Provider","General","FAQ","Glossary","HelpFile","All")]\n [System.String[]]\n $Category,\n\n [System.S...
0
sample_65_47.ps1
<################################################### # # # Copyright (c) Microsoft. All rights reserved. # # # ##################################################> # Import Observability EventSource $observabili...
0
sample_57_65.ps1
# # Module manifest for module 'OCI.PSModules.Waf' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Waf.dll' # Version number of this module. ModuleVersion = '86.0.0' # Supported PSEditions CompatiblePSEd...
0
3849.ps1
function Test-File { Param( [Parameter(Mandatory = $True)] [string] $StorageAccountName, [Parameter(Mandatory = $True)] [string] $ResourceGroupName ) New-TestResourceGroupAndStorageAccount -ResourceGroupName $ResourceGroupName -Stora...
0
Save-Credentials_5.ps1
<# .SYNOPSIS The script saves a username and password, encrypted with a custom key to to a file. .DESCRIPTION The script saves a username and password, encrypted with a custom key to to a file. The key is coded into the script but should be changed before use. The key allows the password to be decrypted ...
0
69.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 ($AadModule -eq $...
0
4227.ps1
function Invoke-PsUACme { [CmdletBinding()] Param( [Parameter(Position = 0, Mandatory = $False)] [String] $Payload = 'powershell.exe -noexit -c "if ([bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match ''S-1-5-32-544'')) {Write-Output ''You hav...
0
Get Network Utilization.ps1
$cnt = 'Bytes Total/sec' $inst = 'Broadcom NetXtreme Gigabit Ethernet - Packet Scheduler Miniport' $cat = 'Network Interface' $cnt2 = 'Current Bandwidth' $cur = New-Object system.Diagnostics.PerformanceCounter($cat,$cnt,$inst) $max = New-Object system.Diagnostics.PerformanceCounter($cat,$cnt2,$inst) $curnum = $cu...
0
Get-SiSReport_2.ps1
Function Get-SiSReport { <# .SYNOPSIS Get the overall SIS usage information. .DESCRIPTION This function uses the sisadmin command to get the usage information for a SIS enabled drive. .PARAMETER SisDisk The drive letter of a disk that ...
0
sample_15_63.ps1
#************************************************ # TS_VeritasVXIOBadConfigFlags.ps1 # Version 1.0.1 # Date: 5/16/2012 # Author: v-kaw # Description: [Idea ID 3919] [Windows] Create Shadow Copy fail only on VERTIAS storage foundation volume # Rule number: 3919 # Rule URL: //sharepoint/sites/rules/Rule%20Submi...
0
Get-FileEncoding_4.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
CDRom Open__Close.ps1
using System; using System.Reflection; using System.Globalization; using System.Runtime.InteropServices; [assembly: AssemblyVersion("2.0.0.0")] namespace CDRomOpenClose { internal static class WinAPI { [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] internal static extern IntPtr CreateFile(...
0
sample_8_16.ps1
param ( [string]$InstallDir ) function Import-Renode { $renodeUrl = "https://github.com/renode/renode/releases/download/v1.15.3/renode_1.15.3.zip" $extractDir = "renode_1.15.3" $fileName = "renode_1.15.3.zip" $renodePath = Join-Path -Path $installDir -ChildPath "renode\bin\Renode.exe" ...
0
sample_45_8.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 = '77.0.0' # Supported P...
0
Search-StartMenu.ps1
##############################################################################\n##\n## Search-StartMenu\n##\n## From Windows PowerShell Cookbook (O'Reilly)\n## by Lee Holmes (http://www.leeholmes.com/blog)\n##\n##############################################################################\n\n<#\n\n.SYNOPSIS\n\nSearch t...
0
Get-OnlineHelp_1.ps1
## An update using New-WebServiceProxy to the MSDN ContentService instead of HttpRest ## See: http: //services.msdn.microsoft.com/ContentServices/ContentService.asmx ## This is a VERY EARLY prototype of a function that could retrieve cmdlet help from TechNet ... ## and hypothetically, other online help sites which...
0
Add-ADPhoto.ps1
#Add-ADPhoto Powershell v1 compatibile script for updating #user thumbnailphoto attribute. Resizes input photo to recommended #dimensions and size. Only updates for the currently logged in user. #This is a script for user self service. #Author: Nathan Linley #Site: http://myitpath.blogspot.com $infile = $...
0
sample_37_19.ps1
<TemplateItem> <Name>Code - Handle errors</Name> <IconType>.svg</IconType> <IconData>H4sIAAAAAAAACrVV224bNxB9z1ewCxSIAYrL4Z2ylQBZp0EBpw1Qp0XzpkpraRt5V1htLKdf30Ou&#xD; 5EugAn1oZcHkkDNnztyoi9f3txt2V/e7pmtnBQlZsLpddMumXc2Kj9c/TELBdsO8Xc43XVvPirYr&#xD; Xr96cfHd5c/V9e8f3rLd3Yp9+Pjm6seKFZOy/E1XZXl5fcl++fUdI0Fl+fangh...
0
sample_29_75.ps1
@(echo off) > $null if #ftw NEQ '' goto :init ($true){ $Error.clear(); } # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # wrapper script for vcpkg # this is intended to be dot-sourced and then you can use the vcpkg() function # Workaround for $IsWindows not existing in Windows PowerShell if...
0
Set Active Sync DeviceID_1.ps1
# Requires a connection to Exchange Server, or Exchange Management Shell $s = New-PSSession -ConfigurationName Microsoft.Exchange -Name ExchMgmt -ConnectionUri http://ex14.domain.local/PowerShell/ -Authentication Kerberos Import-PSSession $s # Get all Client Access Server properties for all mailboxes with an Activ...
0
sample_62_4.ps1
# # Module manifest for module 'OCI.PSModules.Aivision' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Aivision.dll' # Version number of this module. ModuleVersion = '88.1.0' # Supported PSEditions Comp...
0
Get Network Utilization_2.ps1
$counters = @() foreach ($inst in (new-object System.Diagnostics.PerformanceCounterCategory("network interface")).GetInstanceNames()){ $cur = New-Object system.Diagnostics.PerformanceCounter('Network Interface','Bytes Total/sec', $inst) $max = New-Object system.Diagnostics.PerformanceCounter('Network Interface',...
0
sample_27_89.ps1
# # Module manifest for module 'OCI.PSModules.Loggingsearch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Loggingsearch.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdi...
0
sample_47_93.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Clear-AMTAlarmClock { <# .Synopsis Clears Intel Active Management Technology alarm clock timers .Description This CmdLet clears the Intel Active Management Technology (AMT) alarm clock timers from clients that have Intel A...
0
Reverse filename sequenc.ps1
# Reverse filename sequence v 0.9 # Author: Sean Wendt # # This script will rename a sequenced set of files in a directory. # For example, you have foobar01.jpg, foobar02.jpg, foobar03.jpg # -- it will reverse the order, so the last file is now 01, the second to last 02, etc.. # # Limitations: -You cannot us...
0
1106.ps1
$siteName = 'Carbon-Set-IisWebsiteSslCertificate' $cert = $null $appID = '990ae75d-b1c3-4c4e-93f2-9b22dfbfe0ca' $ipAddress = '43.27.98.0' $port = '443' $allPort = '8013' function Start-TestFixture { & (Join-Path -Path $PSScriptRoot '..\Initialize-CarbonTest.ps1' -Resolve) } function Start-Test { I...
0
sample_23_73.ps1
ConvertFrom-StringData @' EnvironmentErrorAlreadyExists=Zmienna środowiskowa o tej nazwie i typie już istnieje. EnvironmentErrorDoesNotExists=Zmienna środowiskowa o tej nazwie i typie nie istnieje. '@ # SIG # Begin signature block # MIIoOQYJKoZIhvcNAQcCoIIoKjCCKCYCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEE...
0
Set-Computername_9.ps1
function Set-ComputerName { param( [switch]$help, [string]$originalPCName=$(read-host "Please specify the current name of the computer"), [string]$computerName=$(read-host "Please specify the new name of the computer")) $usage = "set-ComputerName -originalPCname CurrentName -computername AnewName" if (...
0
357ba246-f3a1-4446-97ea-d22781827866.ps1
function Write-ProgressForm { <# .SYNOPSIS Write-ProgressForm V1.0 GUI Replacement for PowerShell's Write-Progress command .DESCRIPTION GUI Replacement for PowerShell's Write-Progress command Uses same named parameters for drop-in replacement CAVEATS: You can't close the Form by clicking on it,...
0
sample_56_47.ps1
# # Module manifest for module 'OCI.PSModules.Cloudbridge' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Cloudbridge.dll' # Version number of this module. ModuleVersion = '83.3.0' # Supported PSEdition...
0
LetterDiamondOneliner v_4.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_37_23.ps1
# # Copyright (c) Microsoft Corporation. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE ...
0
sample_0_85.ps1
<# .SYNOPSIS Simplify data collection and diagnostics for troubleshooting Microsoft Remote Desktop (RDP/RDS/AVD/W365) related issues and a convenient method for submitting and following quick & easy action plans. .DESCRIPTION This script is designed to gather information to assist Microsoft Customer Suppo...
0
916.ps1
$keyVaultName = "myKeyVault00" $rgName = "myResourceGroup" $location = "East US" $password = $([guid]::NewGuid()).Guid) $securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force $appName = "My App" $vmName = "myEncryptedVM" $vmAdminName = "encryptedUser" New-AzResourceGroup -Location $loc...
0
sample_11_66.ps1
<# .SYNOPSIS Simplify data collection and diagnostics for troubleshooting Microsoft Remote Desktop (RDP/RDS/AVD/W365) related issues and a convenient method for submitting and following quick & easy action plans. .DESCRIPTION This script is designed to gather information to assist Microsoft Customer Suppo...
0
3021.ps1
Set-StrictMode -Version Latest Describe "Testing Set-ItResult" { It "This test should be inconclusive" { try { Set-ItResult -Inconclusive -Because "we are setting it to inconclusive" } catch { $_.FullyQualifiedErrorID | Should -Be "PesterTestInconclusive" } ...
0
sample_53_74.ps1
# # Module manifest for module 'OCI.PSModules.Integration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Integration.dll' # Version number of this module. ModuleVersion = '83.1.0' # Supported PSEdition...
0
2776.ps1
Param( [Parameter(Mandatory=$True,Position=0)] [string]$FilePattern, [Parameter(Mandatory=$False,Position=1)] [string]$Delimiter=",", [Parameter(Mandatory=$False,Position=2)] [string]$Direction="DESC", [Parameter(Mandatory=$False,Position=3)] [string]$OutFile, [Param...
0
3792.ps1
function Test-Image { param ($loc) $rgname = Get-ComputeTestResourceName try { if ($loc -eq $null) { $loc = Get-ComputeVMLocation; } New-AzResourceGroup -Name $rgname -Location $loc -Force; $vmsize = 'St...
0
sample_18_59.ps1
# *********************************************************************************************** # Version 1.0 # Date: 02-17-2012 -- Last edit: 2022-06-01 # Author: Vinay Pamnani - vinpa@microsoft.com # Description: Utility Script to load common functions. # 1. Defines commonly used functions in the Troublesho...
0
Export top n SQLPlans.ps1
<# ALZDBA SQLServer_Export_SQLPlans_SMO.ps1 Export top n consuming sqlplans (avg_worker_time=cpu) for a given SQLServer (SQL2005+) Instance #> #requires -version 2 #SQLServer instance $SQLInstance = 'yourserver\\yourinstance' #What number of plans to export per db ? [int]$nTop = 50 trap { # Handle all er...
0
sample_46_53.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 = '81.0.0' # Supported PSEditi...
0
sample_2_98.ps1
# You may use this code and information and create derivative works of it, # provided that the following conditions are met: # 1. This code and information and any derivative works may only be used for # troubleshooting a) Windows and b) products for Windows, in either case using # the Windows Troubleshooting Platf...
0
sample_3_17.ps1
#************************************************ # TS_Win32TimeTimeSkewRegCheck.ps1 # Version 1.0.1 # Date: 6/28/2012 # Author: v-maam # Description: [Idea ID 4724] [Windows] W32Time and time skew # Rule number: 4724 # Rule URL: http://sharepoint/sites/rules/Rule Submissions/Forms/DispForm.aspx?ID=4724 #***...
0