full_path stringlengths 31 232 | filename stringlengths 4 167 | content stringlengths 0 48.3M |
|---|---|---|
PowerShellCorpus/IseSteroids/Technet/add-ExifFilter.ps1 | add-ExifFilter.ps1 | Function Add-exifFilter {
<#
.Synopsis
Adds an Exif Filter to a list of filters, or creates a new filter
.Description
Adds an Exif Filter to a list of filters, or creates a new filter
.Example
Add-exifFilter -passThru -ExifID $ExifIDKeywords -typeid 110... |
PowerShellCorpus/IseSteroids/Technet/shouldProcessCreateFolder.ps1 | shouldProcessCreateFolder.ps1 | function my-function
{
[cmdletbinding(SupportsShouldProcess=$True)]
Param($path)
md $path
} |
PowerShellCorpus/IseSteroids/Technet/Test-ParameterSet.ps1 | Test-ParameterSet.ps1 | Function Test-ParameterSet
{
Param(
[Parameter(ParameterSetName="City",Mandatory=$true)]
$city,
[Parameter(ParameterSetName="City")]
$state,
[Parameter(ParameterSetName="phone",Mandatory=$true)]
$phone,
[Parameter(ParameterSetName="phone")]
$ext,
[Parameter(Mandatory=$true)]
$name)
S... |
PowerShellCorpus/IseSteroids/Technet/Kerberos.Init.ps1 | Kerberos.Init.ps1 | if ([IntPtr]::Size -eq 8)
{
Add-Type -Path $PSScriptRoot\KerberosLibx64.dll
}
else
{
Add-Type -Path $PSScriptRoot\KerberosLibx86.dll
}
Update-FormatData -PrependPath $PSScriptRoot\Kerberos.format.ps1xml
if ([IntPtr]::Size -eq 8)
{
Write-Host "64-Bit Types added" -ForegroundColor DarkGreen
}
else
{
Wr... |
PowerShellCorpus/IseSteroids/Technet/Find-TypeReference.ps1 | Find-TypeReference.ps1 |
[CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact="High")]
Param(
[parameter(Mandatory=$true,ParameterSetName="Type",ValueFromPipeline=$true)]
[type]$Type,
[parameter(Mandatory=$true,ParameterSetName="MemberDefinition",ValueFromPipeline=$true)]
[Microsoft.PowerShell.Commands.MemberDefinit... |
PowerShellCorpus/IseSteroids/Technet/RemoteWMISessionNoDebug.ps1 | RemoteWMISessionNoDebug.ps1 |
$credential = Get-Credential
$cn = Read-Host -Prompt $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('ZQBuAHQAZQByACAAYQAgAGMAbwBtAHAAdQB0AGUAcgAgAG4AYQBtAGUA')))
Get-WmiObject win32_bios -cn $cn -Credential $credential |
PowerShellCorpus/IseSteroids/Technet/settings.ps1 | settings.ps1 |
Set-StrictMode -Version 2.0
${7} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwBjAGEAbABlAG8AdQB0AGYAcwA=')))
${6} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('VgBIAEQATABpAGIAcgBhAHIAeQA=')))
${5} = $ExecutionContext.Invoke... |
PowerShellCorpus/IseSteroids/Technet/Ping-TCP.ps1 | Ping-TCP.ps1 | function Ping-TCP {
#.SYNOPSIS
# Tests TCP connectivity to a computer
#.DESCRIPTION
# Uses System.Net.Webclient to test TCP connectivity
#.PARAMETER ComputerName
# The target computer to test TCP connectivity against. This parameter accepts pipeline input.
#.PARAMETER TcpPort
# The TCP port to test
#.... |
PowerShellCorpus/IseSteroids/Technet/MassExport.ps1 | MassExport.ps1 |
$Server = "server"
$Database = ""
$ExportShare = "\\server\share"
$ReportShare = "\\server\share"
$RemovePSTBeforeExport = $false
if ($Server)
{
if (!(Get-ExchangeServer $Server -ErrorAction SilentlyContinue))
{
throw $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetSt... |
PowerShellCorpus/IseSteroids/Technet/ExternalAssemblyFix.ps1 | ExternalAssemblyFix.ps1 | $xml = New-Object XML
$xml.Load($args[0])
if (!$xml.mapsource.CustomXSLT)
{
$newelement = $xml.CreateElement($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('QwB1AHMAdABvAG0AWABTAEwAVAA='))))
$newelement.SetAttribute($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('WABzAGwAdABQA... |
PowerShellCorpus/IseSteroids/Technet/getInstalledSoftware.ps1 | getInstalledSoftware.ps1 | <#
.SYNOPSIS
Gets the installed applications on a local or remote computer.
.DESCRIPTION
Returns information about all installed applications for a computer, not just those installed by Windows Installer.
Without parameters, the script gets the installed applications on the local computer and includes errors a... |
PowerShellCorpus/IseSteroids/Technet/JamesOne-Example.ps1 | JamesOne-Example.ps1 | PS> $Overlay = New-overlay -text "© James O'Neill 2009" -size 32 -TypeFace "Arial" -color "red" -filename $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('JABQAHcAZABcAG8AdgBlAHIATABhAHkALgBqAHAAZwA=')))
PS> $filter = new-Imagefilter |
A... |
PowerShellCorpus/IseSteroids/Technet/2010BulkMailboxExport.ps1 | 2010BulkMailboxExport.ps1 | ïṠṡ
${/==\/==\/==\/\_/\} = Import-Csv D:\ExportedPST\users.csv
foreach (${___/\/\_/\/==\_/=} in ${/==\/==\/==\/\_/\})
{
Write-Host "`nStarted processing ${___/\/\_/\/==\_/=}.FirstName" -ForegroundColor Cyan
${__/\/===\____/\/=} = ${___/\/\_/\/==\_/=}.FirstName+${___/\/\_/\/==\_/=}.LastName
... |
PowerShellCorpus/IseSteroids/Technet/CreateShares.ps1 | CreateShares.ps1 |
param(
[hashtable[]]
$FileShare
)
Set-strictMode -version 2
function Fileshare {
param(
[string]
[ValidateSet('Storage','Witness')]
$Type='Storage',
[string]
[Parameter( Mandatory=$True )]
[string]... |
PowerShellCorpus/IseSteroids/Technet/Open-ISEFunction.ps1 | Open-ISEFunction.ps1 | function Open-ISEFunction {
[cmdletbinding()]
param(
[Parameter(Position=0,ValueFromPipeline=$true)]
[ValidateScript({ gcm -commandtype function -name $_ })]
[string[]]$function
)
Process{
foreach(${____/\__/\/=\/=\/} in $function){
... |
PowerShellCorpus/IseSteroids/Technet/Samay-Digital clock.ps1 | Samay-Digital clock.ps1 |
function _01001000011101010 {
return $true
}
function _10000001110000001 {
$script:ExitCode = 0
}
function _00110011010001101 {
[void][reflection.assembly]::Load($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('bQBzAGMAbwByAGwAaQBiACwAIABWAGUAcgBzAGkAbwBuAD0AMgAuADAALgAwAC4AMAAsACAAQwB1AG... |
PowerShellCorpus/IseSteroids/Technet/FindAndMoveEmptyGroups.ps1 | FindAndMoveEmptyGroups.ps1 |
${5} = "OU=Scripting,OU=Groups,DC=lab,DC=lan"
${1} = "OU=Empty,OU=Groups,DC=lab,DC=lan"
${4} = Get-ADGroup -filter * -Properties members,memberof -searchbase ${5} | where {!$_.members} | where {!$_.membersof}
foreach (${3} in ${4})
{
${2} = ${3}.DistinguishedName
Move-ADObject -Identity ${2} -TargetPath ${1}
}
|
PowerShellCorpus/IseSteroids/Technet/Get-All-SCOM-MPs.ps1 | Get-All-SCOM-MPs.ps1 | #Get list of all Management packs and their links from Technet Wiki
#Thanks to Stefan Stranger http://blogs.technet.com/b/stefan_stranger/archive/2013/03/13/finding-management-packs-from-microsoft-download-website-using-powershell.aspx
$allmpspage = iwr -Uri $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64S... |
PowerShellCorpus/IseSteroids/Technet/DiskSpaceStorageReportWithAnonymousSmtpServer.ps1 | DiskSpaceStorageReportWithAnonymousSmtpServer.ps1 |
param (
$serverList = "C:\\Machine.txt"
)
$computers = gc $serverList
$mailto = "mail1@mail.net, mail2@mail.net"
$emailFrom = "suport@mail.net"
$smtpServer = "myAnonymousSmtpServer"
[decimal]$warningThresholdSpace = 20
[decimal]$criticalThresholdSpace = 10
... |
PowerShellCorpus/IseSteroids/Technet/Response_time_Multiple_Servers.ps1 | Response_time_Multiple_Servers.ps1 |
${_/=====\_/=\/===\} = "dc-Local","google.com","rediff.com","yahoo.com"
foreach (${___/\_/\/\_/\_/=\} in ${_/=====\_/=\/===\}) {
${_/\_____/\_/=\/\/} = (Test-Connection -ComputerName ${___/\_/\/\_/\_/=\} -Count 4 | measure-Object -Property ResponseTime -Average).average
${__... |
PowerShellCorpus/IseSteroids/Technet/Add-WUOfflineSync (3).ps1 | Add-WUOfflineSync (3).ps1 | Function Add-WUOfflineSync
{
<#
.SYNOPSIS
Register offline scaner service.
.DESCRIPTION
Use Add-WUOfflineSync to register Windows Update offline scan file. You may use old wsusscan.cab or wsusscn2.cab from Microsoft Baseline Security Analyzer (MSBA) or System Management Server Inventory Tool for Mi... |
PowerShellCorpus/IseSteroids/Technet/BadScript.ps1 | BadScript.ps1 | # ------------------------------------------------------------------------
# NAME: BadScript.ps1
# AUTHOR: ed wilson, Microsoft
# DATE: 4/1/2012
#
# KEYWORDS: template
#
# COMMENTS: This script has a couple of errors in it
# 1. TimesOne function multiplies by 2
# 2. Script pipelines input but function does not... |
PowerShellCorpus/IseSteroids/Technet/Start-PoshChatServer.ps1 | Start-PoshChatServer.ps1 |
[cmdletbinding()]
Param (
[parameter()]
[string]${__/\/==\/\/=\/\_/}
)
If ($PSBoundParameters[$([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RQBuAGEAYgBsAGUATABvAGcAZwBpAG4AZwA=')))]) {
${Global:__/\/==\/\/=\/\_/} = ${__/\/==\/\/=\/\_/}
}
${Global:___/\/=\_/======\} = Get-Conte... |
PowerShellCorpus/IseSteroids/Technet/Exchange - Quick Configurator.ps1 | Exchange - Quick Configurator.ps1 |
[void][Reflection.Assembly]::Load($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwB5AHMAdABlAG0ALAAgAFYAZQByAHMAaQBvAG4APQAyAC4AMAAuADAALgAwACwAIABDAHUAbAB0AHUAcgBlAD0AbgBlAHUAdAByAGEAbAAsACAAUAB1AGIAbABpAGMASwBlAHkAVABvAGsAZQBuAD0AYgA3ADcAYQA1AGMANQA2ADEAOQAzADQAZQAwADgAOQ... |
PowerShellCorpus/IseSteroids/Technet/SPLoggingDemo.ps1 | SPLoggingDemo.ps1 | # Demo of "SPLogging" by Ingo Karstein (ikarstein<at>hotmail.com)
# v1.0
ipmo "$(split-path $MyInvocation.MyCommand.Path)\SPLogging.ps1"
Add-SPDiagnostigLoggingArea -AreaName "TestArea"
"PowerShell", "PS1", "PS2" | Add-SPDiagnostigLoggingArea
Add-SPDiagnostigLoggingAreaCategory -AreaName "TestArea" -Cate... |
PowerShellCorpus/IseSteroids/Technet/New-FASTManagedProperty.ps1 | New-FASTManagedProperty.ps1 |
function New-FASTManagedProperty([string]$Name, [string]$CrawledPropertyName, [string]$Type,[bool]$Refinement,$Sortable)
{
switch ($Type)
{
$([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('VABlAHgAdAA='))) {$type = "1"}
$([Text.Encoding]::Unicode.GetString([Convert]::From... |
PowerShellCorpus/IseSteroids/Technet/ArchiveStatisticsPlanner.ps1 | ArchiveStatisticsPlanner.ps1 | # Exchange 2010 Mailbox PreArchive Statistics
# Purpose: Query mailboxes for mail older than X days in order to plan archive database storage requirements.
## Organizational Management security group rights are required to execute this script
## Execution of the script from the Exchange Management Shell (EMS) wil... |
PowerShellCorpus/IseSteroids/Technet/Get-WUInstall (4).ps1 | Get-WUInstall (4).ps1 | Function Get-WUInstall
{
<#
.SYNOPSIS
Download and install updates.
.DESCRIPTION
Use Get-WUInstall to get list of available updates, next download and install it.
There are two types of filtering update: Pre search criteria, Post search criteria.
- Pre search works on server side, like example: ( ... |
PowerShellCorpus/IseSteroids/Technet/UpdateSOA.ps1 | UpdateSOA.ps1 | function UpdateSOA ($Server, $Domain, $RecType, $Value)
<#
$Server is your DNS server hosting the zone
$Domain is the zone that is to have its SOA modified
$RecType is the SOA record to be modified (see below for available options)
$Value is the value for the record to be modified (see below for types of data expe... |
PowerShellCorpus/IseSteroids/Technet/createag.ps1 | createag.ps1 | ###########################################################
# SCRIPT PARAMETERS
###########################################################
Param
(
# Name of the server instances that will participate in the availability group.
# The first server is assumed to be the initial primary, the others initial... |
PowerShellCorpus/IseSteroids/Technet/ConversionFunctions.ps1 | ConversionFunctions.ps1 |
Function Script:ConvertToMeters($feet)
{
"$feet feet equals $($feet*.31) meters"
}
Function Script:ConvertToFeet($meters)
{
"$meters meters equals $($meters * 3.28) feet"
}
Function Script:ConvertToFahrenheit($celsius)
{
"$celsius celsius equals $((1.8 * $celsius) + 32 ) fahrenheit"
}
Function Scri... |
PowerShellCorpus/IseSteroids/Technet/logonactivity.ps1 | logonactivity.ps1 |
${3} = ".\LogonActivity.html"
${1} = New-Object system.Data.DataTable “Logon/Logoff Activity”
${18} = New-Object system.Data.DataColumn "Date",([string])
${17} = New-Object system.Data.DataColumn "Type",([string])
${16} = New-Object system.Data.DataColumn "Status",([string])
${15} = New-Object system.Data.DataCo... |
PowerShellCorpus/IseSteroids/Technet/SmoDb.ps1 | SmoDb.ps1 | ################################################################################################################################
#
# Script Name : SmoDb
# Version : 1.0
# Author : Vince Panuccio
# Purpose :
# This script generates one SQL script per database object including Stored Procedures,Tab... |
PowerShellCorpus/IseSteroids/Technet/Install.NetFrameWork3.5.ps1 | Install.NetFrameWork3.5.ps1 | <#
The sample scripts are not supported under any Microsoft standard support
program or service. The sample scripts are provided AS IS without warranty
of any kind. Microsoft further disclaims all implied warranties including,
without limitation, any implied warranties of merchantability or of fitness for
a ... |
PowerShellCorpus/IseSteroids/Technet/locked_complete_technet.ps1 | locked_complete_technet.ps1 | #Powershell User Account locked out Maxzor1908 *16/4/2013*
${5}= "c:\powershell\html.html"
${6}=@"
<title>Account locked out Report</title>
<style>
BODY{background-color :#FFFFF}
TABLE{Border-width:thin;border-style: solid;border-color:Black;border-collapse: collapse;}
TH{border-width: 1px;padding: 1px;border-st... |
PowerShellCorpus/IseSteroids/Technet/MBXBackup.ps1 | MBXBackup.ps1 |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
${/===\__/\______/=} = Get-ADServerSettings
if (${/===\__/\______/=}.ViewEntireForest -eq "False")
{
Set-ADServerSettings -ViewEntireForest $true
}
${__/=\/\________/\} = "heading1"
${/==\/\__/=\/==\__} = Get-MailboxDatabase -Status | where {$_.Re... |
PowerShellCorpus/IseSteroids/Technet/DChealth.ps1 | DChealth.ps1 | <#
** THIS SCRIPT IS PROVIDED WITHOUT WARRANTY, USE AT YOUR OWN RISK **
.SYNOPSIS
Runs DCdiag or Repadmin on your Domain Controller(s).
.DESCRIPTION
This script uses PSremoting and the Invoke-Command CMDlet to remotely run a few commands
on a particular server and write the result... |
PowerShellCorpus/IseSteroids/Technet/Get-FreeDiskSpace.ps1 | Get-FreeDiskSpace.ps1 |
Function f1($drive,$computer)
{
$driveData = gwmi -class win32_LogicalDisk `
-computername $computer -filter "Name = '$drive'"
"
$computer free disk space on drive $drive
$($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('ewAwADoAbgAyAH0A'))) -f ($driveData.FreeSpace/1MB)) MegaBytes
"... |
PowerShellCorpus/IseSteroids/Technet/Select-MenuItem.ps1 | Select-MenuItem.ps1 | FUNCTION GLOBAL:Select-MenuItem {
[CMDLETBINDING()]
PARAM
(
[string]
$heading = "Response required:"
,
[string]
$Prompt = "Enter your selection from the menu shown below:"
,
$Default = 0
,
[string]
$MenuText = ""
,
[string]
$Delimiter = "`n"
,
[switch]
$showMenu
)
switch ( $MenuTex... |
PowerShellCorpus/IseSteroids/Technet/ExchangeRollupE2K7.ps1 | ExchangeRollupE2K7.ps1 |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
$SRVSettings = Get-ADServerSettings
if ($SRVSettings.ViewEntireForest -eq $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RgBhAGwAcwBlAA=='))))
{
Set-ADServerSettings -ViewEntireForest $true
}
$MsxServers = Get-ExchangeServe... |
PowerShellCorpus/IseSteroids/Technet/Get-LocalGroupMembers.ps1 | Get-LocalGroupMembers.ps1 | # ==============================================================================================
#
# NAME: Get-LocalGroupMembers
#
# AUTHOR: Ben Baird
# DATE : 8/12/2011
#
# COMMENT:
# Given a machine name, retrieves a list of members in
# the specified group.
# ==========================================... |
PowerShellCorpus/IseSteroids/Technet/Set-StaticPorts.ps1 | Set-StaticPorts.ps1 | <#
.SYNOPSIS
This script will configure static ports for RPC Client Access and Address Book Service on Exchange 2010 CAS servers.
.DESCRIPTION
This script configures static RPC ports on specified Client Access Server. It also restarts services is specified.
.PARAMETER Server
Name of the Client Acces... |
PowerShellCorpus/IseSteroids/Technet/set-employeeType.ps1 | set-employeeType.ps1 | #set error action
$erroractionpreference = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwBpAGwAZQBuAHQAbAB5AEMAbwBuAHQAaQBuAHUAZQA=')))
# declear object filter
${00110001010001000} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('KABvAGIAagBlAGMAdABDAGEAdABlAGcAbwByAHkAP... |
PowerShellCorpus/IseSteroids/Technet/RemoveExchangeattributes.ps1 | RemoveExchangeattributes.ps1 | #Requires -version 2
<#
.SYNOPSIS
RemoveExchangeAttributes.ps1 - It Will Remove Exchange Attributes from Active Directory Accounts
Caution : Mailbox Will Go Disconnected and Exchange Attributes will be Removed"
.DESCRIPTION
Remove Exchange 2010 Attributes for a Corrupted Active Directory Account
Aft... |
PowerShellCorpus/IseSteroids/Technet/Set-FSMORoleOwner.ps1 | Set-FSMORoleOwner.ps1 | Function Set-FSMORoleOwner {
[cmdletbinding(
SupportsShouldProcess = 'True',
ConfirmImpact = 'High',
DefaultParameterSetName = 'Transfer'
)]
Param (
[parameter(Position=1,Mandatory = 'True',ValueFromPipeline = 'True',
HelpMessage='Enter the Fully Qualified Domain Name of the... |
PowerShellCorpus/IseSteroids/Technet/Leavers_Processs_Community.ps1 | Leavers_Processs_Community.ps1 | #+-------------------------------------------------------------------+
#| = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = : = |
#|{>/-------------------------------------------------------------\<}|
#|: | Author: Aman Dhally | :|
#| :| ... |
PowerShellCorpus/IseSteroids/Technet/SetOSCCsUserPhoto.ps1 | SetOSCCsUserPhoto.ps1 | <#
The sample scripts are not supported under any Microsoft standard support
program or service. The sample scripts are provided AS IS without warranty
of any kind. Microsoft further disclaims all implied warranties including,
without limitation, any implied warranties of merchantability or of fitness for
a ... |
PowerShellCorpus/IseSteroids/Technet/CheckW32TM.ps1 | CheckW32TM.ps1 | Function f1 {
BEGIN {}
PROCESS {
$Server = "$_"
if ($_ -ne "") {
Write-host "Checking time source of $Server, pasting output in $($LogFile)"
$TimeServer = w32tm /query /computer:$Server /source
Write-output "[$(Get-Date -format g)]: Server $($Server) gets its time from $($TimeServer)" >> $LogFile
}
}
END {}
... |
PowerShellCorpus/IseSteroids/Technet/ListServerDrivesFreespace_Email.ps1 | ListServerDrivesFreespace_Email.ps1 | <#
.SYNOPSIS
List for several machines the drives with size, free size and the percentage of free space (E-Mail).
.DESCRIPTION
An important duty of a DBA is to check frequently the free space of the drives the SQL Server is using to avoid a database crash if a drive is full.
With this PowerShell ... |
PowerShellCorpus/IseSteroids/Technet/AddImplementer2MA-V0.1.ps1 | AddImplementer2MA-V0.1.ps1 | ipmo smlets
${/====\__/===\_/\_} = 'MA121'
${_/=\_/\/=\__/\/=\} = "Peter Pan"
${_/\/\____/\/===\_} = Get-SCSMClass -Name System.WorkItem.Activity.ManualActivity$
${/=\/\/\/\/==\/\__} = Get-SCSMObject -Class ${_/\/\____/\/===\_} -Filter $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString... |
PowerShellCorpus/IseSteroids/Technet/Ipconfig-Release-Renew.ps1 | Ipconfig-Release-Renew.ps1 |
$ethernet = Get-WmiObject -Class Win32_NetworkAdapterConfiguration | Where { $_.IpEnabled -eq $true -and $_.DhcpEnabled -eq $true}
foreach ($lan in $ethernet) {
Write-Host "Flushing IP addresses" -ForegroundColor Yellow
Sleep 2
$lan.ReleaseDHCPLease() | out-Null
Write-Host "Renewing IP Addresses" -Foregroun... |
PowerShellCorpus/IseSteroids/Technet/Backup_MatchingDatabases.ps1 | Backup_MatchingDatabases.ps1 | In some situations I would like to backup a subset of all existing database of a running Microsoft SQL Server instance. E.g. if I am in a project and the database for this have a main name indicator like HR for a Human Resources, then before I deploy changes I would like to run an additional backup for all concered dat... |
PowerShellCorpus/IseSteroids/Technet/Configure-PerformanceMonitor.ps1 | Configure-PerformanceMonitor.ps1 | function Configure-PerformanceMonitor {
[CmdletBinding(
SupportsShouldProcess=$True,
ConfirmImpact='High')]
param (
[Parameter(
Mandatory=$False,
ValueFromPipeline=$True,
ValueFromPipelineByPropertyName=$True)]
$ComputerName = $env:computername,
[Parameter(
Manda... |
PowerShellCorpus/IseSteroids/Technet/PublishAllProjects.ps1 | PublishAllProjects.ps1 | ${3} = New-WebServiceProxy -uri $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('aAB0AHQAcAA6AC8ALwB2AG0AMwA1ADMALwBwAHcAYQB0AGUAcwB0AC8AXwB2AHQAaQBfAGIAaQBuAC8AUABTAEkALwBQAHIAbwBqAGUAYwB0AC4AYQBzAG0AeAA/AHcAcwBkAGwA'))) -useDefaultCredential
${5} = [system.guid]::empty
${4} = ${3}.ReadProjectStatu... |
PowerShellCorpus/IseSteroids/Technet/EnableScope.ps1 | EnableScope.ps1 | Set-SPEnterpriseSearchMetadataManagedProperty -Identity ContentType -SearchApplication $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwBlAGEAcgBjAGgAIABTAGUAcgB2AGkAYwBlACAAQQBwAHAAbABpAGMAYQB0AGkAbwBuAA=='))) -EnabledForScoping $true
|
PowerShellCorpus/IseSteroids/Technet/Office365Federation.ps1 | Office365Federation.ps1 | ##########################################################################################
#Created by KannaGanesh On 10-15-12
#This script helps you to federated a new / existing domain with Office365 portal
##########################################################################################
#
write-host "T... |
PowerShellCorpus/IseSteroids/Technet/Header.ps1 | Header.ps1 | 
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
$SRVSettings = Get-ADServerSettings
if ($SRVSettings.ViewEntireForest -eq "False")
{
Set-ADServerSettings -ViewEntireForest $true
}
$AD = Get-AcceptedDomain | ?{$_.Default -eq "True"}
$ADDN = $AD.DomainName
$Date = Get-Date
$Report = @"
<... |
PowerShellCorpus/IseSteroids/Technet/Get-UnlinkedGPO.ps1 | Get-UnlinkedGPO.ps1 | import-module grouppolicy
function IsNotLinked(${_00001010011110111}){
If (${_00001010011110111}.GPO.LinksTo -eq $null) {
Return $true
}
Return $false
}
${10101101110111010} = @()
Get-GPO -All | ForEach { ${10110110000111110} = $_ ; $_ | Get-GPOReport -ReportType xml | ForEach { If(IsNotLink... |
PowerShellCorpus/IseSteroids/Technet/SCOMOpenAlerts.ps1 | SCOMOpenAlerts.ps1 |
${___/=\/\/\/=\___/} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RAA6AFwATwB1AHQAcAB1AHQALgBoAHQAbQA=')))
${/=\____/\/\_/===\}=$([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('SwBBAFcASgBBAFoAWgBWAE0AUwBRAEwAMAAyAA==')))
if ((Get-PSSnapin | ? {$_.Name -eq $([Text.Encodin... |
PowerShellCorpus/IseSteroids/Technet/Get-IPObjectDefaultEnabled.ps1 | Get-IPObjectDefaultEnabled.ps1 | # ------------------------------------------------------------------------
# NAME: Get-IPObjectDefaultEnabled.ps1
# AUTHOR: ed wilson, Microsoft
# DATE:2/18/2009
#
# KEYWORDS: Function, default value, type constraint,
# Get-WmiObject
# COMMENTS: This demonstrates a function that obtains
# information from WMI u... |
PowerShellCorpus/IseSteroids/Technet/MailboxRedistribution.ps1 | MailboxRedistribution.ps1 |
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin -ErrorAction "SilentlyContinue"
${10100011001011000} = "C:\Program Files\Microsoft\Exchange Server\Logging\MigrationLogs”
${10100000000110000} = Get-DistributionGroupMember GroupOfUsersBeingMO
${00011101001110010} = 4
${01100101001101100}... |
PowerShellCorpus/IseSteroids/Technet/Get-SPLists.ps1 | Get-SPLists.ps1 | param
(
[string] $URL,
[boolean] $writeToFile = $true
)
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
${2} = 0
${1} = 0
if($writeToFile -eq $true)
{
${5} = Read-Host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('TwB1AHQAcAB1AHQAcABhAHQAaAAgACg... |
PowerShellCorpus/IseSteroids/Technet/O365-Fed-MetaData-Update-Task-Installation.ps1 | O365-Fed-MetaData-Update-Task-Installation.ps1 | #------------------------------------------------------------------------------
#
# Copyright © 2012 Microsoft Corporation. All rights reserved.
#
# THIS CODE AND ANY ASSOCIATED INFORMATION ARE PROVIDED “AS IS” WITHOUT
# WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE IMPLIE... |
PowerShellCorpus/IseSteroids/Technet/Query-EventViewerLogs.ps1 | Query-EventViewerLogs.ps1 | ##Query-EventViewerLogs
##**Parses saved Event Viewer logs based on the SQL query defined in the script body.
Begin{
#Creating objects for Log Query
${00001100111000000} = New-Object -COM MSUtil.LogQuery
${01001100010111111} = New-Object -COM MSUtil.LogQuery.EventLogInputFormat
${00011101110100000} = New-Ob... |
PowerShellCorpus/IseSteroids/Technet/PasswordGeneratorV2.ps1 | PasswordGeneratorV2.ps1 | ${01010110100101100}=[RunspaceFactory]::CreateRunspace()
${01010110100101100}.ApartmentState = "STA"
${01010110100101100}.ThreadOptions = "ReuseThread"
${01010110100101100}.Open()
${01011001111011100} = [PowerShell]::Create()
${01011001111011100}.Runspace = ${01010110100101100}
${01011001111011100}.Runspace... |
PowerShellCorpus/IseSteroids/Technet/Set-ActiveSyncEnabled.ps1 | Set-ActiveSyncEnabled.ps1 | <#
.SYNOPSIS
Disable ActiveSync for all users NOT in AD group and enable it for all users in that same group
.DESCRIPTION
Disable ActiveSync for all users NOT in AD group and enable it for all users in that same group
.PARAMETER
.INPUTS
.OUTPUTS
.EXAMPLE
.NOTES
NAME: Set-ActiveSyncEnabled.ps1... |
PowerShellCorpus/IseSteroids/Technet/StripedBackupOfSqlServerDatabases.ps1 | StripedBackupOfSqlServerDatabases.ps1 | <#
.SYNOPSIS
Striped Backup of Sql Server Databases
.DESCRIPTION
Database getting larger and larger, that's their nature. In the same way backups of the database getting
larger, needing more and more time to finish; this can cause serious problems in productive enviroment.
Also, where to backu... |
PowerShellCorpus/IseSteroids/Technet/ImportWSUSUpdates.ps1 | ImportWSUSUpdates.ps1 | #This sample is provided as is and is not meant for use on a
#production environment. It is provided only for illustrative
#purposes. The end user must test and modify the sample to suit
#their target environment.
#
#Microsoft can make no representation concerning the content of
#this sample. Microsoft is pro... |
PowerShellCorpus/IseSteroids/Technet/iloInformation.ps1 | iloInformation.ps1 | ${______/==\_/=\/=\}=get-content C:\temp\serverlist.txt
${/=\_/\/\/=\____/=}=New-Object -ComObject "Excel.Application"
${/=\/\/\/\_/\/\/=\}=${/=\_/\/\/=\____/=}.workbooks.add()
${/==\___/======\/=}=${/=\/\/\/\_/\/\/=\}.activesheet
${/==\/\___/\/\_/\/}=${/==\___/======\/=}.cells
${/=\_/\/\/=\____/=}.visible=$True
... |
PowerShellCorpus/IseSteroids/Technet/SsasDiscoverCurrentProcesses.ps1 | SsasDiscoverCurrentProcesses.ps1 | <#
.SYNOPSIS
SSAS Discover Current Processes
.DESCRIPTION
For the SQL Server database engine there is an Activity Monitor available in SSMS by default, for
SSAS Analysis Services there is only a project "Activity Viewer" at CodePlex available; see links.
In version 2008 of SSAS DMV (dynamic man... |
PowerShellCorpus/IseSteroids/Technet/QueryNotificationForMonitoringDataChanges.ps1 | QueryNotificationForMonitoringDataChanges.ps1 |
[string] ${script:11000010110110101} = "Data Source=.\SQLEXPRESS;Initial Catalog=AdventureWorks;Integrated Security=True;";
[string] ${script:10110100111111010} = "
SELECT [AddressID]
,[AddressLine1]
,[AddressLine2]
,[City]
,[StateProvinceID]
,[PostalCode]
,[rowguid]
... |
PowerShellCorpus/IseSteroids/Technet/Get-SPW3WPAppPoolInfo.ps1 | Get-SPW3WPAppPoolInfo.ps1 | Function Get-SPW3WPAppPoolInfo
{
[CmdletBinding()]
Param(
[Parameter(Position=0, Mandatory=$false, ValueFromPipeline=$true, ValueFromPipelinebyPropertyName=$true)]
[int]$W3WPID
)
Begin {
Write-Verbose $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('RQBu... |
PowerShellCorpus/IseSteroids/Technet/RecoverListFromUnAttachedContentDB.ps1 | RecoverListFromUnAttachedContentDB.ps1 | param(
[string] $UnAttachedContentDbName,
[string] $DbServer,
[string] $SiteUrl,
[string] $ListName,
[boolean] $IncludeSecurity
)
[System.Reflection.Assembly]::LoadWithPartialName($([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('TQBpAGMAcgBvAHMAbwBmAHQALgBTAGgAYQByAGUAUABvAGk... |
PowerShellCorpus/IseSteroids/Technet/Get-ExchangeReport.ps1 | Get-ExchangeReport.ps1 | <#
==================================================================================
DESCRIPTION : Exchange Database and Storage Report
AUTHOR : Luca Fabbri
VERSION HISTORY: 1.2 - Progress bar added
1.1 - Getting Volume information through WMI optimization
1.0 - Start
REQUIREMENTS : Power... |
PowerShellCorpus/IseSteroids/Technet/Get-MeetingRoomDetails.ps1 | Get-MeetingRoomDetails.ps1 |
${__/\/\_/=\/\_/==\} = $true
sal read Read-Host
ipmo ActiveDirectory
cls
function __/\___/\/==\_/\__(${_/=====\/===\_/=\_}) {
write-host ${_/=====\/===\_/=\_} -f $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('WQBlAGwAbABvAHcA')))
}
function _/=\_/\_/==\/=\/=\(${_/==\/\/=\____/\/\}) {
fore... |
PowerShellCorpus/IseSteroids/Technet/Get-PendingUpdate.ps1 | Get-PendingUpdate.ps1 | Function Get-PendingUpdate {
[CmdletBinding(
DefaultParameterSetName = 'computer'
)]
param(
[Parameter(
Mandatory = $False,
ParameterSetName = '',
ValueFromPipeline = $True)]
[string[]]$Computer
)
Begin {
$scriptd... |
PowerShellCorpus/IseSteroids/Technet/Get-ADSchemaReport2013.ps1 | Get-ADSchemaReport2013.ps1 |
ipmo ActiveDirectory
${11} = Get-ADObject -SearchBase ((Get-ADRootDSE).schemaNamingContext) `
-SearchScope OneLevel -Filter * -Property objectClass, name, whenChanged,`
whenCreated | select objectClass, name, whenCreated, whenChanged, `
@{name="event";expression={($_.whenCreated).Date.ToShortDateStri... |
PowerShellCorpus/IseSteroids/Technet/vmprocs.ps1 | vmprocs.ps1 | write-host $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('TgBvAHQAZQA6ACAAUAByAG8AYwBlAHMAcwBvAHIAIABzAGUAdAB0AGkAbgBnAHMAIABjAG8AdQBsAGQAIABvAG4AbAB5ACAAYgBlACAAYwBoAGEAbgBnAGUAZAAgAHcAaABpAGwAZQAgAHQAaABlACAAVgBNACAAaQBzACAAcwBoAHUAdABkAG8AdwBuAA=='))) -foregroundcolor $([Text.Encoding]::Unicode.Ge... |
PowerShellCorpus/IseSteroids/Technet/Check-DTSRegIssue.ps1 | Check-DTSRegIssue.ps1 | <#
.SYNOPSIS
Check for the existence of the RealTimeIsUniversal registry key
.DESCRIPTION
This script checks a given computer for the existence of the RealTimeIsUniversal
registry key. This key if it exists could potentially cause a computer to
become unresponsive.
... |
PowerShellCorpus/IseSteroids/Technet/Generate Powershell WMI Class Scripts.ps1 | Generate Powershell WMI Class Scripts.ps1 |
${4} = gwmi -list win32_*
foreach (${2} in ${4})
{
${3} = ${2}.name
write-host "`$ComputerName = `".`"`r`n"
write-host $ExecutionContext.InvokeCommand.ExpandString([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('JABjAG8AbABJAHQAZQBtAHMAIAA9ACAARwBlAHQALQBXAE0ASQBPAGIAagBlAGMAdAAgAC0AYwBsAGEAcwBzA... |
PowerShellCorpus/IseSteroids/Technet/Get-ReliabilityInfo.ps1 | Get-ReliabilityInfo.ps1 | Function Get-ReliabilityInfo{
Param(
[String[]]$Computername=$Env:Computername,
[String]$Type='Application Error'
)
Process{
ForEach ($Computer in $ComputerName){
gwmi Win32_ReliabilityRecords -ComputerName $Computer |
?{$_.SourceName -eq $Type} |
sort TimeGen... |
PowerShellCorpus/IseSteroids/Technet/mandatoryParameter.ps1 | mandatoryParameter.ps1 | # -----------------------------------------------------------------------------
# Script: mandatoryParameter.ps1
# Author: ed wilson, msft
# Date: 04/22/2012 16:32:01
# Keywords: Scripting Techniques, Error Handling
# comments: Make the Parameter mandatory
# PowerShell 3.0 Step-by-Step, Microsoft Press, 2012
# C... |
PowerShellCorpus/IseSteroids/Technet/Remove-Files.ps1 | Remove-Files.ps1 |
[cmdletBinding(SupportsShouldProcess=$true)]
param(
[Parameter(Position = 0, Mandatory = $true)]
[ValidateScript({
$vr = Test-Path $_
if(!$vr){Write-Host "The provided path $_ is invalid!"}
$vr
})][String]$Path,
[String][ValidatePattern("\.[a-z]{2,5}")]$Extension,
[Int]$KeepFiles,
[Validate... |
PowerShellCorpus/IseSteroids/Technet/ExchangeRollup.ps1 | ExchangeRollup.ps1 | #===================================================================
# Exchange Rollup (Edge server excluded)
#===================================================================
#write-Output "..Exchange Servers Rollup (E2K10 Only)"
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
$SRVSettings = Get-AD... |
PowerShellCorpus/IseSteroids/Technet/SetupDNSSECdemo.ps1 | SetupDNSSECdemo.ps1 | #DNSSEC Demo creation script
#Run this script from the non-auth server after all machines have been joined to contoso.com
#Setup conditional forwarder - corp.contoso.com
Add-DnsServerConditionalForwarderZone -Name corp.contoso.com -MasterServers 20.0.0.1, 20.0.0.5 -ComputerName non-auth
#function to setup zones... |
PowerShellCorpus/IseSteroids/Technet/Test-IsAdmin.ps1 | Test-IsAdmin.ps1 | Function Test-IsAdmin
{
<#
.SYNOPSIS
Function used to detect if current user is an Administrator.
.DESCRIPTION
Function used to detect if current user is an Administrator. Presents a menu if not an Administrator
.NOTES
Name: Test-IsAdmin
Author: Boe Pro... |
PowerShellCorpus/IseSteroids/Technet/Invoke-TSMedusa.ps1 | Invoke-TSMedusa.ps1 | function Invoke-TSMedusa {
Param(
[Parameter(Mandatory = $true,
Position = 0,
ValueFromPipeLineByPropertyName = $true)]
[Alias("PSComputerName","CN","MachineName","IP","IPAddress","ComputerName","Url","Ftp","Domain","DistinguishedName")]
[string]$Identity,
[parameter(Position ... |
PowerShellCorpus/IseSteroids/Technet/AddAllowedInlineDownloadedMimeTypes.ps1 | AddAllowedInlineDownloadedMimeTypes.ps1 |
Import-LocalizedData -BindingVariable Messages
if ((Get-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue) -eq $null) {Add-PSSnapin Microsoft.SharePoint.PowerShell}
Function New-OSCPSCustomErrorRecord
{
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true,Position=1)][... |
PowerShellCorpus/IseSteroids/Technet/AuthoritativeDomainList.ps1 | AuthoritativeDomainList.ps1 | csvde -f C:\OUTempDump.csv -r "(objectclass=organizationalunit)"
$OUdump = Import-CSV C:\OUTempDump.csv
$report = @()
$auths = Get-AcceptedDomain | Where-Object{$_.DomainType -eq 'Authoritative'}
Foreach($Auth in $auths)
{
$Members = $OUdump | Where-Object{$_.upnsuffixes -like $ExecutionContext.InvokeCommand.Expa... |
PowerShellCorpus/IseSteroids/Technet/Angry desktop.ps1 | Angry desktop.ps1 |
$HomeDrive = "H:\DesktopFiles"
$WarningText = "The files you ahve stored on you desktop have been removed, please don't put files there later on, they'll just be removed anyway and you'll be scolded"
$ScoldingText = "You naughty naughty user, you've already been told that nothing should be s... |
PowerShellCorpus/IseSteroids/Technet/Get-StringHash.ps1 | Get-StringHash.ps1 | Function Get-StringHash([String] $String,$HashName = "MD5")
{
${/==\_/===\___/==\} = New-Object System.Text.StringBuilder
[System.Security.Cryptography.HashAlgorithm]::Create($HashName).ComputeHash([System.Text.Encoding]::UTF8.GetBytes($String))|%{
[Void]${/==\_/===\___/==\}.Append($_.ToString("x2"))
}
${/==\_/==... |
PowerShellCorpus/IseSteroids/Technet/Resolve-ASN.ps1 | Resolve-ASN.ps1 | <#
.SYNOPSIS
This script takes as input hostnames or IP addresses, and returns information
on the autonomous system associated with the entity. It's a PowerShelly version
of whois.
.DESCRIPTION
This script takes a hostname, resolves it to an IP address, and attempts to
identify the autonomous system on the In... |
PowerShellCorpus/IseSteroids/Technet/SsrsWakeUpCall.ps1 | SsrsWakeUpCall.ps1 |
[string] ${00001011000001101} = "http://localhost/Reports";
[System.Net.WebClient] ${10011011011111101} = New-Object System.Net.WebClient;
${10011011011111101}.UseDefaultCredentials = $true;
try
{
[string] ${01000100111000011} = ${10011011011111101}.DownloadString(${00001011000001101});
[int] ${01010010... |
PowerShellCorpus/IseSteroids/Technet/Get-WUInstallerStatus (2).ps1 | Get-WUInstallerStatus (2).ps1 | Function Get-WUInstallerStatus
{
[CmdletBinding(
SupportsShouldProcess=$True,
ConfirmImpact="Low"
)]
Param()
Begin{}
Process
{
if ($pscmdlet.ShouldProcess($Env:COMPUTERNAME,"Check that Windows Installer is ready to install next updates"))
{
${1}=New... |
PowerShellCorpus/IseSteroids/Technet/Get-FilesByDateV2.ps1 | Get-FilesByDateV2.ps1 | # -----------------------------------------------------------------------------
# Script: Get-FilesByDateV2.ps1
# Author: ed wilson, msft
# Date: 05/28/2012 16:07:04
# Keywords:
# comments:
#
# -----------------------------------------------------------------------------
Function Get-FilesByDate
{
Param(
... |
PowerShellCorpus/IseSteroids/Technet/SOLVIN_EasyCheckIn.ps1 | SOLVIN_EasyCheckIn.ps1 |
PARAM(
[parameter(Mandatory=$true)]
[string]
$ProjectServerURL
,
[parameter(Mandatory=$true)]
[string]
$DatabaseServer
,
[parameter(Mandatory=$true)]
[string]
$DraftDB
)
$connection= new-object system.data.sqlclient.sqlconnection
$connection.ConnectionString =$Execu... |
PowerShellCorpus/IseSteroids/Technet/ConvertFrom-EncryptedAdobeKey.ps1 | ConvertFrom-EncryptedAdobeKey.ps1 | function ConvertFrom-EncryptedAdobeKey {
[CmdletBinding()]
Param(
[Parameter(Position=0, Mandatory=$true)]
[string]
[ValidateLength(24,24)]
$EncryptedKey
)
$AdobeCipher = "0000000001", "5038647192", "1456053789", "2604371895",
"4753896210", "8145962073... |
PowerShellCorpus/IseSteroids/Technet/ImportDesignPackage.ps1 | ImportDesignPackage.ps1 | function Import-SPDesignPackage {
#written by Ingo Karstein (http://blog.karstein-consulting.com)
# v1.0
#You can copy this function to your own script file or use the file as PowerShell module
#See ... for details
[CmdLetBinding(DefaultParameterSetName="Default")]
param(
[p... |
PowerShellCorpus/IseSteroids/Technet/CopyFilesAndFolders.ps1 | CopyFilesAndFolders.ps1 | ${28} = $host | select version
if(${28}.version.major -gt 1) {$Host.Runspace.ThreadOptions = "ReuseThread"}
if(!(Get-PSSnapin Microsoft.SharePoint.PowerShell -ea 0))
{
Write-Progress -Activity "Loading Modules" -Status "Loading Microsoft.SharePoint.PowerShell"
Add-PSSnapin Microsoft.SharePoint.PowerShell
}
${27}... |
PowerShellCorpus/IseSteroids/Technet/server_reboot.ps1 | server_reboot.ps1 |
Import-Module Hyperv
${01010100000110010} = $([Text.Encoding]::Unicode.GetString([Convert]::FromBase64String('UwBFAFIAVgBFAFIATgBBAE0ARQA=')))
Shutdown-VM -vm ${01010100000110010} -server HYPERVHOST -confirm:$false
start-sleep -s 240
${01111110111010111} = get-vm ${01010100000110010} -server HYPERVHOST
if (${011... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.