This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $core = "MyCoreServerName" | |
| $ldmS = New-WebServiceProxy -uri http://$core/MBSDKService/MsgSDK.asmx?WSDL -UseDefaultCredential | |
| $TASKS = $LDMS.ListSWDTasks() | |
| $NoPush = $TASKS.ScheduledTasks | Where-Object {($_.DeliveryMethodName -notlike '*push*') -and ($_.Status -like "Available For Download")} | Sort-Object TaskID | |
| $T = $NoPush.count | |
| $N=0 | |
| ForEach($Task in $NoPush){ | |
| $N++ | |
| $Started = $LDMS.StartTaskNow("$($Task.TaskID)","all") | |
| IF($Started -eq $true){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #*============================================= | |
| #* Script Name: Get-AppGroups.ps1 | |
| #* Created: 05/18/2016-published | |
| #* Author: David S. Elias | |
| #* Email: [email protected] | |
| #* Requirements: PowerShell v.3.0, ActiveDirectory Module | |
| #*============================================= | |
| function GenerateForm { | |
| [reflection.assembly]::loadwithpartialname("System.Drawing") | Out-Null | |
| [reflection.assembly]::loadwithpartialname("System.Windows.Forms") | Out-Null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #* FileName: My-ADTools_v1.psm1 | |
| #*============================================= | |
| #* Script Name: Create-ADVisio | |
| #* Created: 07/01/2014-published | |
| #* Author: David S. Elias | |
| #* Email: [email protected] | |
| #* Requirements: Read rights in Active Directory, Server Local Admin rights, SQL SysAdmin rights | |
| #* Keywords: AD, SQL, share, groups, nested | |
| #*============================================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $OldSource = 'MySQLServer-01' | |
| $NewSource = 'MySQLServer-02' | |
| $URL = 'http://ReportServerName/ReportServer/ReportService2010.asmx?wsdl' | |
| $URI = New-Object System.Uri($URL) | |
| $SSRS = New-WebServiceProxy -Uri $URI -UseDefaultCredential | |
| $DataSources = ($SSRS.ListChildren("/data sources", $true)).path | |
| ForEach($Source in $DataSources){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #* FileName: Import-RemoteCommands.ps1 | |
| #*============================================= | |
| #* Script Name: Import-RemoteCommands | |
| #* Created: 07/10/2014-published | |
| #* Author: David S. Elias | |
| #* Email: [email protected] | |
| #* Requirements: PowerShell v2.0+ | |
| #* Keywords: Function, module, command, cmdlet, import, remoting | |
| #*============================================= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Get-LoggedOnUser { | |
| <# | |
| .Synopsis | |
| Queries a computer to check for interactive sessions | |
| .DESCRIPTION | |
| This script takes the output from the quser program and parses this to PowerShell objects | |
| .NOTES | |
| Name: Get-LoggedOnUser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Kill-Sessions{ | |
| Param( | |
| [Array]$Computer | |
| ) | |
| $AllSessions=@() | |
| [int]$Number = 0 | |
| ForEach($ComputerName in $Computer){ | |
| $SystemSessions = (Get-LoggedOnUser -ComputerName $ComputerName -ErrorAction SilentlyContinue) | |
| ForEach($Session in $SystemSessions){ | |
| $Number=($Number+1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Function Get-TimeZone { | |
| Param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [Array]$ComputerName | |
| ) | |
| $AllTime=@() | |
| ForEach ($Computer in $ComputerName ) { | |
| IF((gwmi -class Win32_SystemTimeZone -ComputerName $Computer -ErrorAction SilentlyContinue) -gt $null){ | |
| $Time = (Get-Time $Computer) |