filename
stringlengths
5
142
content
stringlengths
2
26M
label
int64
0
1
Get-ADGroupModifications.ps1
###########################################################################" # # NAME: Get-ADGroupModificationsReport.ps1 # # AUTHOR: Jan Egil Ring # EMAIL: jan.egil.ring@powershell.no # # COMMENT: Generates a HTML-report of Active Directory group membership modifications (addings and deletions). # Sp...
0
sample_52_17.ps1
@{ GUID = 'A51E6D9E-BC14-41A7-98A8-888195641250' Author="Microsoft Corporation" CompanyName="Microsoft Corporation" Copyright="Copyright (C) Microsoft Corporation. All rights reserved." ModuleVersion = '1.0' NestedModules = @('MSFT_MpPerformanceRecording.psm1') FormatsToProcess = @(...
0
2616.ps1
function New-MSFLabImage{ [CmdletBinding()] param([string]$ISO ,[string]$OutputPath ,[string]$ImageName ,[string]$Edition ,[string]$UnattendXML ,[string[]]$CustomModules ) $ErrorActionPreference = 'Stop' . C:\git-repositories\PowerShell\Convert-WindowsImage.ps1 Write-Verbose "Validating Bui...
0
sample_9_54.ps1
# Load Common Library # Load Reporting Utilities #_#$debug = $false . ./utils_cts.ps1 $FirstTimeExecution = FirstTimeExecution trap [Exception]{ WriteTo-StdOut "$($_.InvocationInfo.ScriptName)($($_.InvocationInfo.ScriptLineNumber)): $_" -shortformat; continue Write-Host "$($_.InvocationInfo.ScriptName)($...
0
sample_11_38.ps1
#************************************************ # TS_IPv6Check.ps1 # Version 1.0 # Date: 5-1-2012 # Author: davidcop # Description: Checks for nics with IPv6 unchecked and the disabledcomponents registry value does not exist #************************************************ #_# update for Win10 if ((($OSVe...
0
New-CodeSigningCert_2.ps1
## New-CodeSigningCert.ps1 ######################################################################################################################## ## Does the setup needed to self-sign PowerShell scripts ... ## Generates a "test" self-signed root Certificate Authority ## And then generates a code-signing certific...
0
Send SNMP trap.ps1
Param ( $DestinationHost ) Add-Type -Path "C:\\Program Files\\LeXtudio Software\\sharpsnmplib.dll" Add-Type -Path "C:\\Program Files\\LeXtudio Software\\SharpSnmpLib.Controls.dll" $manager = [system.Net.Dns]::Resolve( $DestinationHost ).AddressList[0] $TrapDest = New-Object Net.IPEndPoint( $manager, 162 ) [Lextm...
0
sample_21_4.ps1
#Collect files for VSSBackup package Import-LocalizedData -BindingVariable VSSBackupFilesStrings Write-DiagProgress -Activity $VSSBackupFilesStrings.ID_VSSBackupPkgFiles -Status $VSSBackupFilesStrings.ID_VSSBackupPkgFilesObtaining $filesToCollect = "$Env:windir\Logs\WindowsServerBackup\*.*" $filesDescription...
0
951.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" $apiType = "EnableCassandra" $accountResourceType = "Microsoft.DocumentDb/databaseAccounts" $keyspac...
0
sample_5_38.ps1
#************************************************ # TS_SurfacePro3DetectConnectedStandbyHibernationConfig.ps1 # Version 1.0.09.19.14: Created and tested SurfacePro3 scripts from Sep12-19 # Date: 2014 # Author: bbenson # Description: SurfacePro3DetectConnectedStandbyHibernationConfig # # Rule GUID: 03F8CAD0-6D61-...
0
JSON_1.ps1
#requires -version 2.0 # Version History: # v 0.5 - First Public version # v 1.0 - Made ConvertFrom-Json work with arbitrary JSON # - switched to xsl style sheets for ConvertTo-JSON # There is no help (yet) because I'm still changing and renaming everything every time I mess with this code # Full Round...
0
sample_17_95.ps1
##------------------------------------------------------------------ ## <copyright file="Constants.psm1" company="Microsoft"> ## Copyright (C) Microsoft. All rights reserved. ## </copyright> ##------------------------------------------------------------------ $ObservabilityConfigConstants = @{ Extensio...
0
sample_33_70.ps1
# # Module manifest for module 'OCI.PSModules.Sch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Sch.dll' # Version number of this module. ModuleVersion = '80.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_17_99.ps1
'************************************************************* ' ' ADOBE SYSTEMS INCORPORATED ' Copyright 2005-2010 Adobe Systems Incorporated ' All Rights Reserved ' NOTICE: Adobe permits you to use, modify, and ' distribute this file in accordance with the terms ' of the Adobe license agreement accompa...
0
3027.ps1
Set-StrictMode -Version Latest InModuleScope Pester { Describe "the In statement" { Setup -Dir "test_path" It "executes a command in that directory" { In "$TestDrive" -Execute { "" | Out-File "test_file" } "$TestDrive\test_file" | Should -Exist } It "update...
0
sample_39_49.ps1
ConvertFrom-StringData @' ###PSLOC OSVersion = Operating System version is '{0}'. Expected '{1}' OSBuild = Operating System on '{0}' build is '{1}'. Expected '{2}' OSVersionSkip = Cannot determine desired operation system version. MinOSCheck = Operating System version '{0}' should be greater than '{1}' NTPServerC...
0
458.ps1
Set-PSFConfig -Module PSFramework -Name 'Serialization.WorkingDirectory' -Value $script:path_typedata -Initialize -Validation "string" -Description "The folder in which registered type extension files are placed before import. Relevant for Register-PSFTypeSerializationData."
0
sample_34_11.ps1
# Copyright (C) Intel Corporation, 2007 - 2019 All Rights Reserved. Function Get-AMTHardwareAsset { <# .Synopsis Shows hardware information about the system .Description This Cmdlet returns the hardware information from clients that have Intel Active Management Technology (AMT) firmware version 3.2 ...
0
LocalStorage module.ps1
if($Args) { [string]$script:LocalStorageModuleName = $Args[0] } elseif($LocalStorageModuleName) { [string]$script:LocalStorageModuleName = $LocalStorageModuleName } else { [string]$script:LocalStorageModuleName = "LocalStorage" } function Get-LocalStoragePath { #.Synopsis # Gets the LocalApplicati...
0
sample_4_29.ps1
ConvertFrom-StringData @' id_ctscertificates=Certificates id_ctscertificatesdescription=Collects information about Certificates. id_ctscertificatesmachinestore=Certificates id_ctscertificatesmachinestoredescription=Collecting information about certificates in the machine store. id_ctscertificatesuserstore=Certific...
0
sample_6_85.ps1
# # Module manifest for module 'OCI.PSModules.Workrequests' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Workrequests.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditi...
0
2107.ps1
function Run-TestOnWinFull { [CmdletBinding()] param( [string]$name ) switch ($name) { "ActionPreference:ErrorAction=SuspendOnWorkflow" { workflow TestErrorActionSuspend { "Hello" } $r = TestErrorActionSuspend -ErrorAction Suspend $r | Should -BeExactly '...
0
1637.ps1
function Get-BootConfigurationData { param ( $bcdeditpath = (Join-Path $env:SystemRoot 'system32\bcdedit.exe') ) $bootconfigurationdata = iex $bcdeditpath $bootconfigurationdata += '' $hash = $null $result = foreach ($line in $bootconfigurationdata) { if ($line -eq '') { ...
0
Convert-StringSID.ps1
function Convert-StringSID { <# .Synopsis Takes a SID string and outputs a Win32_SID object. .Parameter sidstring The SID in SDDL format. Example: S-1-5-21-39260824-743453154-142223018-195717 .Description Takes a SID string and outputs a Win32_SID object. Note: it also adds an extra property, base64...
0
sample_35_83.ps1
# # Module manifest for module 'OCI.PSModules.Generativeaiinference' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Generativeaiinference.dll' # Version number of this module. ModuleVersion = '74.1.0' #...
0
3499.ps1
if ($PSEdition -eq 'Desktop') { try { [Microsoft.Azure.PowerShell.Authenticators.DesktopAuthenticatorBuilder]::Apply([Microsoft.Azure.Commands.Common.Authentication.AzureSession]::Instance) } catch {} }
0
sample_55_17.ps1
# # Module manifest for module 'OCI.PSModules.Stackmonitoring' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Stackmonitoring.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported P...
0
2973.ps1
param($Thumbprint) $ErrorActionPreference = 'Stop' $cert = Get-ChildItem Cert:\CurrentUser\My | Where-Object Thumbprint -eq $Thumbprint if ($null -eq $cert) { throw "No certificate was found." } if (@($cert).Length -gt 1) { throw "More than one cerfificate with the given thumbprint was found." } "Signing Fi...
0
Hack ESX MOTD_1.ps1
$screen = @" You see here a virtual switch. ------------ ------ #...........| |....| --------------- ###------------ |...(| |..%...........|########## ###-@...| ...
0
sample_25_7.ps1
# # Module manifest for module 'OCI.PSModules.Operatoraccesscontrol' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Operatoraccesscontrol.dll' # Version number of this module. ModuleVersion = '74.1.0' #...
0
sample_18_51.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_14_34.ps1
ConvertFrom-StringData @' id_PoolMon=PoolMon information id_PoolMonrunning=Gathering PoolMon information (PoolMon.exe) id_PoolMonoutput=PoolMon Output id_PoolMonoutputdesc=PoolMon Snaps information '@ # SIG # Begin signature block # MIIoUgYJKoZIhvcNAQcCoIIoQzCCKD8CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3Ag...
0
Migrate-ADMTUser.ps1
###########################################################################" # # NAME: Migrate-ADMTUser.ps1 # # AUTHOR: Jan Egil Ring # EMAIL: jan.egil.ring@powershell.no # # COMMENT: A function to migrate a single user in the Active Directory Migration Tool, based on the sample script Invoke-ADMTUserMigration.p...
0
sample_59_99.ps1
# # Module manifest for module 'OCI.PSModules.Mediaservices' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Mediaservices.dll' # Version number of this module. ModuleVersion = '85.2.0' # Supported PSEdi...
0
4420.ps1
function Update-Script { [CmdletBinding(SupportsShouldProcess = $true, HelpUri = 'https://go.microsoft.com/fwlink/?LinkId=619787')] Param ( [Parameter(ValueFromPipelineByPropertyName = $true, Position = 0)] [ValidateNotNullOrEmpty()] [String[]] $Name,...
0
sample_60_0.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 = '84.0.0' # Supported PSEditions CompatiblePSEd...
0
sample_29_2.ps1
# # Module manifest for module 'Az.ResourceGraph' # # Generated by: Microsoft Corporation # # Generated on: 5/16/2024 # @{ # Script module or binary module file associated with this manifest. RootModule = 'Az.ResourceGraph.psm1' # Version number of this module. ModuleVersion = '1.0.0' # Supported PS...
0
sample_43_76.ps1
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging. #Depending on the operating system of the host machines(s) that will build or run the containers, the image specified in the FROM statement may n...
0
sample_46_38.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_21_6.ps1
function EnsureAdminPrivileges([String]$mesageOnError) { $identity = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = new-object Security.Principal.WindowsPrincipal $identity if (!($principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator))) { Write-Error $m...
0
sample_32_88.ps1
# # Module manifest for module 'OCI.PSModules.Audit' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Audit.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEditions Compatible...
0
AD_bulk_new_OU.ps1
param( $searchBase = "OU=Organisation,DC=uza,DC=local", $NewOUs = @(Import-csv -Path "d:\\projects\\AD\\departments.csv" -Delimiter ";"), $SubOUs = @("Computers","Users"), [switch]$ProtectOU ) $Protect = $false If ($ProtectOU){$Protect = $true} foreach ($NewOU in $NewOUs){ New-ADOrganizationalUnit -Name $New...
0
Get-HardlinkInfo.ps1
# .SYNOPSIS # Returns information about NTFS hard links. Only available on Windows Vista or later. # # .DESCRIPTION # This script can be used to determine how many alternate file names (i.e. hard link # siblings) a particular file has or to return all hard link siblings as FileInfo # objects. It uses the Wi...
0
4184.ps1
cls $OS = Get-WmiObject -Class Win32_OperatingSystem -ComputerName . Switch ($OS.Version) { 5.0.2195 {New-Item -Name "Windows 2000" -Path $env:windir -ItemType File} 5.1.2600 {New-Item -Name "Windows XP" -Path $env:windir -ItemType File} 5.2.3790 {New-Item -Name "Windows XP 64-Bit"...
0
2252.ps1
 [CmdletBinding(SupportsShouldProcess=$true)] param( [parameter(Mandatory=$true, HelpMessage="Site server where the SMS Provider is installed.", ParameterSetName="SingleInstance")] [parameter(Mandatory=$true, ParameterSetName="Recursive")] [ValidateNotNullOrEmpty()] [ValidateScript({Test-Connection -...
0
sample_49_53.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_43_1.ps1
# Localized 06/28/2023 07:56 AM (GMT) 303:7.0.30723 cl_localizationdata.psd1 ConvertFrom-StringData @' ###PSLOC Troubleshoot_Title=Depanare Troubleshoot_DetectNetworkCache=Se verifică cache-ul rețelei Windows Media Player ... Resolution_Title=Rezoluție Resolution_ResetConfiguration=Se resetează toate setările de...
0
Dir for days_1.ps1
Function Create-DatePaths { Param ( [Parameter(Position=0,Mandatory=$True)] [DateTime] $Start, [Parameter(Position=1,Mandatory=$True)] [ValidateScript({$_ -gt $Start})] [DateTime] $End, $DestinationPath=(Join-Path $env:UserProfile "Test") ) 0..(New-...
0
sample_34_8.ps1
# Tenant admin can add their own applocker policy here if needed [string]$CleanupScript = @" <?xml version="1.0"?> <AppLockerPolicy Version="1" /> "@ [string]$SidecarMiPolicy = @" <?xml version="1.0"?> <AppLockerPolicy Version="1"> <RuleCollection Type="Appx" EnforcementMode="NotConfigured" /> ...
0
1693.ps1
$Username = "nocadmin" $Password = "ADMIN-PASSWORD-HERE" $group = "Administrators" $adsi = [ADSI]"WinNT://$env:COMPUTERNAME" $existing = $adsi.Children | Where-Object {$_.SchemaClassName -eq 'user' -and $_.Name -eq $Username } if ($null -eq $existing) { Write-Host "Creating new local user $Username." & NET ...
0
Get Twitter RSS Feed_9.ps1
param ([String] $ScreenName) $client = New-Object System.Net.WebClient $idUrl = "https://api.twitter.com/1/users/show.json?screen_name=$ScreenName" $data = $client.DownloadString($idUrl) $start = 0 $findStr = '"id":' do { $start = $data.IndexOf($findStr, $start + 1) if ($start -gt 0) { $s...
0
sample_63_45.ps1
# # Module manifest for module 'MEDSHelper' # # Generated by: ksarens # # Generated on: 10/8/2021 # @{ # Script module or binary module file associated with this manifest. #RootModule = 'MDEHelper' # Version number of this module. ModuleVersion = '1.0.20.0' # Supported PSEditions # CompatiblePSEdit...
0
sample_25_84.ps1
# # Module manifest for module 'OCI.PSModules.Oce' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Oce.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEd...
0
sample_41_61.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '83.2.0' # Supported PSEditions CompatiblePSEd...
0
sample_27_54.ps1
# .ExternalHelp Microsoft.SystemCenter.OperationsManagerV10.Commands.dll-Help.xml function Get-SCOMCommand { [CmdletBinding(DefaultParameterSetName='CmdletSet')] param( [Parameter(ParameterSetName='AllCommandSet', Position=0, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [Valida...
0
Download File (with %).ps1
<# .SYNOPSIS Downloads a file showing the progress of the download .DESCRIPTION This Script will download a file locally while showing the progress of the download .EXAMPLE .\\Download-File.ps1 'http:\\\\someurl.com\\somefile.zip' .EXAMPLE .\\Download-File.ps1 'http:\\\\someurl.com\\somefile.z...
0
sample_63_25.ps1
# # Module manifest for module 'OCI.PSModules.Sch' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Sch.dll' # Version number of this module. ModuleVersion = '87.0.0' # Supported PSEditions CompatiblePSEd...
0
223.ps1
function Get-NestedMember { [CmdletBinding()] PARAM( [String[]]$GroupName, [String]$RelationShipPath, [Int]$MaxDepth ) TRY{ $FunctionName = (Get-Variable -Name MyInvocation -Scope 0 -ValueOnly).MyCommand Write-Verbose -Message "[$FunctionName] Check if ActiveDirectory Modul...
0
sample_20_28.ps1
<# .SYNOPSIS Module for extended installed Windows Updates report .DESCRIPTION Collects information on installed Windows Updates and generates a report in .html format .NOTES Author : Robert Klemencz Requires : MSRD-Collect.ps1 Version : See MSRD-Collect.ps1 version Feedback : ...
0
New-RandomPassword.ps1
function New-RandomPassword { [CmdletBinding()] param( [Int16] $Length = 6, [Int16] $NumberOfNonAlphaNumericCharacters = 3, [Switch] $AsSecureString ) Begin { try { # Load required assembly. $assem = [System.Reflection.Assembly]::LoadWithPartialName('System.Web') } catch { th...
0
1527.ps1
function Assert-NodeDoesNotExist { [CmdletBinding()] param( [Parameter(Mandatory=$true,Position=0)] [xml] $Xml, [Parameter(Mandatory=$true,Position=1)] [string] $XPath, [Parameter(Position=2)] [string] ...
0
sample_66_91.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 = '85.1.0' # Supported PSEditions Compatible...
0
sample_10_85.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\browserslist@4.22.3\node_modules\browserslist\node_modules;C:\Users\abder\component-maker\web\node_modules\.pnpm\br...
0
chkhash_18.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
Get-DhcpClient.ps1
<# .Description A C# P/Invoke wrapper for DhcpEnumSubnetClients from the DHCP API .Parameter Server A DHCP server to query .Parameter Scope The IP address representing the scope to query #> [CmdLetBinding()] Param( [Parameter(Mandatory = $True)] [Net.IPAddress]$Server, [Parameter(M...
0
sample_16_64.ps1
function New-PlasterManifest { [CmdletBinding(SupportsShouldProcess=$true)] param( [Parameter()] [ValidateNotNullOrEmpty()] [string] $Path = "$pwd\plasterManifest.xml", [Parameter(Mandatory=$true)] [ValidatePattern('^[0-9a-zA-Z_-]+$')] [string] $T...
0
sample_38_11.ps1
# # Module manifest for module 'OCI.PSModules.Jms' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Jms.dll' # Version number of this module. ModuleVersion = '73.1.0' # Supported PSEditions CompatiblePSEd...
0
3329.ps1
function Update-GroupDescription { [PoshBot.BotCommand( Permissions = 'manage-groups' )] [cmdletbinding()] param( [parameter(Mandatory)] $Bot, [parameter(Mandatory, Position = 0)] [string]$Name, [parameter(Mandatory, Position = 1)] [string]...
0
sample_2_15.ps1
# # Module manifest for module 'OCI.PSModules.Database' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Database.dll' # Version number of this module. ModuleVersion = '92.1.0' # Supported PSEditions Comp...
0
sample_37_77.ps1
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. Microsoft.PowerShell.Utility\Import-LocalizedData -BindingVariable Strings -FileName Strings -ErrorAction Ignore Microsoft.PowerShell.Management\Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 | ForEach-Object { . $PSItem.FullName } ...
0
sample_11_64.ps1
# # Module manifest for module 'OCI.PSModules.Applicationmigration' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Applicationmigration.dll' # Version number of this module. ModuleVersion = '73.1.0' # S...
0
Get-DiskSizeInfo_1.ps1
Function Get-DiskSizeInfo { <# .DESCRIPTION Check the Disk(s) Size and remaining freespace. .PARAMETER ComputerName Specify the computername(s) .INPUTS System.String .OUTPUTS System.Management.Automation.PSObject .EXAMPLE ...
0
sample_41_34.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
1381.ps1
function Set-CSslCertificateBinding { [CmdletBinding(SupportsShouldProcess=$true)] [OutputType([Carbon.Certificates.SslCertificateBinding])] param( [IPAddress] $IPAddress = '0.0.0.0', [UInt16] $Port = 443, [Parameter(Mandatory...
0
sample_67_63.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_16_86.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 = '80.0.0' # Supported PSEditions Compatib...
0
2920.ps1
properties { $my_property = $p1 + $p2 } task default -depends TestParams task TestParams { Assert ($my_property -ne $null) '$my_property should not be null' }
0
sample_29_57.ps1
Import-Module ADSync Get-ChildItem -Path "$PSScriptRoot\PSScripts\*.ps1" | % { . $_.FullName } Set-Variable ADSyncDiagnosticsOutputPath "$env:ALLUSERSPROFILE\AADConnect" -option Constant $global:AADTenantCredential = $null $global:AscCustomScriptObjectProperty = 'IsAscCustomScriptObject' # # AADConnect Ge...
0
sample_32_5.ps1
# # Module manifest for module 'OCI.PSModules.Osuborganizationsubscription' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Osuborganizationsubscription.dll' # Version number of this module. ModuleVersion...
0
sample_10_6.ps1
ConvertFrom-StringData @' id_tcpipsettingscheck=Checking for KB 967224 id_tcpipsettingscheckdesc=Checking for modified TcpIp Reg Parameters '@ # SIG # Begin signature block # MIIoUQYJKoZIhvcNAQcCoIIoQjCCKD4CAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG # KX...
0
4197.ps1
[CmdletBinding()] param ( [ValidateNotNullOrEmpty()][string]$Country = 'en-us', [ValidateNotNullOrEmpty()][boolean]$EmailLogs = $true, [string]$EmailRecipients, [string]$EmailSender, [ValidateNotNullOrEmpty()][string]$ExclusionFileName = 'ExclusionList.txt', [ValidateNotNullOrEmpty()][string]$LogFileName =...
0
533.ps1
function Install-SPOSolution { [CmdletBinding()] param ( [Parameter(Mandatory=$true, Position=1)] [string]$solutionName ) Write-Host "Activate solution $path" -foregroundcolor black -backgroundcolor yellow Switch-SPOEnableDisableSolution -solutionName $solutionName -activate $true Write-Host "Solu...
0
sample_61_10.ps1
# ------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License (MIT). See License.txt in the repo root for license information. # ------------------------------------------------------------ function Unpublish-ServiceFab...
0
sample_24_20.ps1
""" Manage Windows features via the ServerManager powershell module. Can list available and installed roles/features. Can install and remove roles/features. :maintainer: Shane Lee <slee@saltstack.com> :platform: Windows Server 2008R2 or greater :depends: PowerShell module ``ServerManager`` """ import lo...
0
sample_60_7.ps1
New-Alias -Name 'pad' -Value 'Show-PSScriptPad' -Force $Platform = 'windows' if ($IsLinux) { $Platform = 'linux' } elseif ($IsMacOS) { $Platform = 'mac' } $Runtime = "net472" if ($IsCoreCLR) { if ($PSVersionTable.PSVersion.Major -eq 7 -and $PSVersionTable.PSVersion.Minor -ge 1) { $Run...
0
1057.ps1
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'CarbonDscTest' -Resolve) -Force Describe 'Carbon_Privilege' { $UserName = 'CarbonDscTestUser' $Password = [Guid]::NewGuid().ToString() Install-User -UserName $UserName -Password $Password BeforeAll { Start-CarbonDscTest...
0
Update-GAC.ps1
# author: jeffrey snover # url: http://blogs.msdn.com/powershell/archive/2008/09/02/speeding-up-powershell-startup-updating-update-gac-ps1.aspx Set-Alias ngen (Join-Path ([System.Runtime.InteropServices.RuntimeEnvironment]::GetRuntimeDirectory()) ngen.exe) [AppDomain]::CurrentDomain.GetAssemblies() | sort {Spli...
0
Find Local Group Members_7.ps1
# Author: Hal Rottenberg # Purpose: Find matching members in a local group # Used tip from RichS here: http://powershellcommunity.org/Forums/tabid/54/view/topic/postid/1528/Default.aspx # Change these two to suit your needs $ChildGroups = "Domain Admins", "Group Two" $LocalGroup = "Administrators" $MemberName...
0
sample_26_4.ps1
# # Module manifest for module 'OCI.PSModules.Datacatalog' # # Generated by: Oracle Cloud Infrastructure # # @{ # Script module or binary module file associated with this manifest. RootModule = 'assemblies/OCI.PSModules.Datacatalog.dll' # Version number of this module. ModuleVersion = '77.0.0' # Supported PSEdition...
0
sample_22_69.ps1
<# .SYNOPSIS Finds the repositories registered with PowerShellGet and registers them for PSResourceGet. #> function Import-PSGetRepository { [CmdletBinding(SupportsShouldProcess, ConfirmImpact = 'Medium')] param( # Use the -Force switch to overwrite existing repositories. [switch...
0
sample_5_70.ps1
ConvertFrom-StringData @' id_ctsmcasecurechannel=Secure Channel Info id_ctsmcagetsecurechannellog=Gathering secure channel information for which domain controllers are being used for authentication. '@ # SIG # Begin signature block # MIIoKgYJKoZIhvcNAQcCoIIoGzCCKBcCAQExDzANBglghkgBZQMEAgEFADB5Bgor # BgEEAYI3AgE...
0
sample_1_45.ps1
# Copyright ?2008, Microsoft Corporation. All rights reserved. # # 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 fo...
0
sample_27_50.ps1
# # Script module for module 'Az.ContainerRegistry' that is executed when 'Az.ContainerRegistry' is imported in a PowerShell session. # # Generated by: Microsoft Corporation # # Generated on: 04/23/2024 13:01:40 # $PSDefaultParameterValues.Clear() Set-StrictMode -Version Latest function Test-DotNet { ...
0
735.ps1
function Write-RsCatalogItem { [CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Medium')] param( [Parameter(Mandatory = $True, ValueFromPipeline = $true)] [string[]] $Path, [Alias('DestinationFolder')] [Parameter(Mandatory = $True)] [string...
0
Shift Operators_1.ps1
#requires -version 2.0 Add-Type @" public class Shift { public static int Left(int x, int count) { return x >> count; } public static uint Left(uint x, int count) { return x >> count; } public static long Left(long x, int count) { return x >> count; } public static ulong Left(ulong x, int ...
0
sample_64_6.ps1
param( [string]$DataPath, ` [switch]$AcceptEula, ` [switch]$Trace, ` [switch]$Logs, ` [switch]$Activity, ` [switch]$Fwd, ` [switch]$FwdCli, ` [switch]$RemShell, ` [switch]$HTTPSYS, ` [switch]$WinHTTP, ` [switch]$CAPI, ` [switch]$Ker...
0
Get-StatType proxy.ps1
# get-mystattype.ps1 : Proxy cmdlet for the Get-StatType cmdlet. # The scripts add the parameter -ShowInstances to the cmdlet # Parameters: # ShowInstances : switch to define if all the instances for each metric will be shown # Author: LucD # History: # v1.0 27/08/09 first version # [CmdletBinding()] param( ...
0
2081.ps1
Describe 'PSModuleInfo.GetExportedTypeDefinitions()' -Tags "CI" { It "doesn't throw for any module" { $discard = Get-Module -ListAvailable | ForEach-Object { $_.GetExportedTypeDefinitions() } $true | Should -BeTrue } } Describe 'use of a module from two runspaces' -Tags "CI" { function N...
0
sample_32_22.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
4171.ps1
function Get-MSUFileInfo { [CmdletBinding()] param ( [System.IO.FileInfo]$FileName ) $RelativePath = (split-path $SCRIPT:MyInvocation.MyCommand.Path -parent) + "\" $Executable = Join-Path -Path $env:windir -ChildPath "System32\expand.exe" $Directory = Join-Path -Path $RelativePath -ChildPath Expan...
0