This file contains 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
Add-Type –Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.dll' | |
Add-Type –Path 'C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI\Microsoft.SharePoint.Client.Runtime.dll' | |
#http://www.codeproject.com/Articles/990131/CRUD-Operation-to-List-Using-SharePoint-Rest-API | |
#https://msdn.microsoft.com/en-us/library/office/fp142380. | |
#http://paulryan.com.au/2013/odata-in-sharepoint/ | |
#https://wmostafaw.wordpress.com/2012/11/17/odata-in-sharepoint-2013-lists-and-items/ | |
#http://blogs.msdn.com/b/uksharepoint/archive/2013/02/22/manipulating-list-items-in-sharepoint-hosted-apps-using-the-rest-api.aspx | |
#http://www.odata.org/getting-started/basic-tutorial/ | |
This file contains 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-webApppoolstatus($pool) | |
{ | |
$poolReturn = @() | |
$poolStatus = gwmi win32_process -filter "Name like '%w3wp%'" | select name, Processid, commandline, creationdate | |
#$poolstatus.converttodatetime($poolStatus.creationdate) | |
foreach($status in $poolStatus) | |
{ | |
if(($status.commandline) -like "*$pool*" -and ($pool -ne $null)) | |
{ | |
$status.creationdate = [System.Management.ManagementDateTimeConverter]::ToDateTime($status.creationdate) |
This file contains 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
#This gets the group information in a functioncall used by two other functions | |
function getComputerGroup | |
{ param($strComputer, $strGroup) | |
$computer = [ADSI]('WinNT://' + $strComputer + ',computer') | |
$Group = $computer.psbase.children.find($strGroup) | |
return $Group | |
} | |
# This will list what’s currently in a Group so you can verify the result | |
function listUsers | |
{ param($strComputer, $strGroup) |
This file contains 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
#http://nakedalm.com/powershell-tfs-2013-api-1-get-tfscollection-and-tfs-services/ | |
#http://blogs.msdn.com/b/alming/archive/2013/03/07/using-powershell-and-tfs-api-to-list-users-in-tfs-2010.aspx | |
#http://www.mikepoulson.com/2014/04/enumerating-tfs-permissions-for-items.html | |
function Connect-ToTfs | |
{ | |
Param([string] $Collectionurl) | |
#the collection url will be cast as a uri to the getteamproject collection. | |
write-host $Collectionurl | |
if ($CollectionUrl -ne '') | |
{ |
This file contains 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
# http://stackoverflow.com/a/13519264 | |
#http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemrights%28v=vs.110%29.aspx | |
function Remove-PermissionsForGroup | |
{ | |
<# | |
.Synopsis | |
Removes Ntfs permissions for the directory specified.. | |
.DESCRIPTION | |
This script sets the ntfs permissions for the directory passed. |
This file contains 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 Test-FileOpen | |
{ | |
<# | |
.SYNOPSIS | |
Tests to see if a file is locked | |
.DESCRIPTION | |
Returns true if the file can be opened. False if the file is open already. | |
.PARAMETER path to file |
This file contains 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
#http://sqlblog.com/blogs/allen_white/archive/2008/01/09/create-agent-jobs-to-run-powershell-scripts.aspx | |
#https://msdn.microsoft.com/en-us/library/ms162162.aspx | |
#Requires -Version 3.0 | |
function Get-SqlJobs | |
{ | |
param([string]$sqlServer, [string]$sqlinstance = $null) | |
$s = New-SqlServerConnection -sqlServer $sqlServer -sqlinstance $sqlinstance | |
$jobs = $s.JobServer.Jobs | |
$jobs | |
} |
This file contains 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
#http://www.iis.net/learn/extensions/configuring-application-request-routing-(arr)/achieving-high-availability-and-scalability-arr-and-nlb | |
# This script is used in octopus to deploy ARR to host targetted for it. | |
# | |
function stop-WAS | |
{ | |
$i = 0 | |
$service = get-service WAS -ErrorAction SilentlyContinue | |
if($service) | |
{ |
This file contains 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
#Requires -Modules webadministration | |
#Requires -RunAsAdministrator | |
#Requires -version 3.0 | |
<# | |
.SYNOPSIS | |
Provides a means to get the current backup location for iis changes | |
.DESCRIPTION | |
Changes made to the IIS instance are recorded in a history config file. This function provides the means to retreive where it is on the machine | |
This file contains 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
# SQLReporting.psm1 Version 0.9 | |
# Written by Trond Hindenes | |
#http://hindenes.com/powershell/SQLReporting.psm1 | |
#Import-Module Pester | |
#http://stackoverflow.com/questions/9178685/change-datasource-of-ssrs-report-with-powershell | |
<# | |
.SYNOPSIS | |
Gets SSRS instances on ComputerName | |
.DESCRIPTION |
OlderNewer