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 language="javascript" type="text/javascript" src="/sites/MySPSite/SiteAssets/jquery-2.2.0.min.js"></script> | |
| <script language="javascript" type="text/javascript" src="/sites/MySPSite/SiteAssets/jquery.SPServices.min.js"></script> | |
| <script type="text/javascript"> | |
| SP.SOD.registerSod('reputation.js', '/_layouts/15/reputation.js'); | |
| SP.SOD.executeFunc('reputation.js', 'Microsoft.Office.Server.ReputationModel.Reputation', function () { | |
| SP.SOD.executeFunc('sp.js', 'SP.ClientContext', LoadRatingFunction); | |
| }); |
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
| param( | |
| [Parameter(Mandatory=$True)][System.Management.Automation.CredentialAttribute()]$cred, | |
| [Parameter(Mandatory=$True)]$cachetToken, | |
| [Parameter(Mandatory=$True)]$slackWebhookURL | |
| ) | |
| $DebugPreference = 'Continue' | |
| Import-Module O365ServiceCommunications |
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
| $cred = Get-Credential | |
| Connect-PnPOnline –Url https://mysite.sharepoint.com/sites/TestSite –Credentials $cred | |
| #get the user id for the user from the site | |
| Get-PNPUser | |
| #get the current number of likes ($item.fieldvalues.LikesCount) and likers ($item.fieldvalues.LikedBy) | |
| $item = Get-PNPListItem -Id 1 -List TestList | |
| #increment the number of likes | |
| Set-PNPListItem -Identity 1 -List TestList -Values @{"LikesCount" = 2; "LikedBy" = @(6,12)} |
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
| @{ | |
| # Point to your module psm1 file... | |
| RootModule = 'SystemStatus.psm1' | |
| # Be sure to specify a version | |
| ModuleVersion = '0.0.1' | |
| Description = 'PoshBot module for getting System Status from Cachet' | |
| Author = 'Ray Terill' | |
| CompanyName = 'Community' |
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
| /* | |
| //config.js | |
| module.exports = { | |
| twitter: { | |
| consumer_key: 'CONSUMER_KEY', | |
| consumer_secret: 'CONSUMER_SECRET', | |
| access_token_key: 'ACCESS_TOKEN_KEY', | |
| access_token_secret: 'ACCESS_TOKEN_SECRET' | |
| } |
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
| const shell = require('node-powershell'); | |
| let ps = new shell({ | |
| executionPolicy: 'Bypass', | |
| noProfile: true, | |
| debugMsg: false | |
| }); | |
| ps.addCommand('./test.ps1') | |
| ps.invoke() |
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
| # Ensure the build fails if there is a problem. | |
| # The build will fail if there are any errors on the remote machine too! | |
| $ErrorActionPreference = 'Stop' | |
| $user = 'MYADMINUSER' | |
| $password = $env:MYADMINPASSWORD | |
| $base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$password))) | |
| $server = "https://MSERVER.MYDOMAIN.COM" | |
| $phoneNumber = $env:PhoneNumber |
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
| <?php | |
| require 'vendor/autoload.php'; | |
| use GuzzleHttp\Client; | |
| $clientID = 'YOUR_APPS_APP_GUID'; | |
| $scope = 'https://graph.microsoft.com/.default'; | |
| $clientSecret = 'YOUR_APPS_PASSWORD'; | |
| $azureTenantID = 'YOUR_AZURE_TENANT_GUID'; |
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
| <QueryList>\ | |
| <Query Id="0" Path="Application">\ | |
| <Select Path="Application">*[System[Provider[@Name='MSSQLSERVER' or @Name='MSSQLSERVER$AUDIT']]]</Select>\ | |
| <Suppress Path="Application">*[System[(EventID=852 or EventID=958 or EventID=3014 or EventID=3197 or EventID=3198 or EventID=3406 or EventID=3407 or EventID=3408 or EventID=3421 or EventID=3454 or EventID=6253 or EventID=6290 or EventID=6299 or EventID=8128 or EventID=9666 or EventID=9688 or EventID=9724 or EventID=10981 or EventID=15268 or EventID=17069 or EventID=17101)]]</Suppress>\ | |
| <Suppress Path="Application">*[System[(EventID=17103 or EventID=17104 or EventID=17110 or EventID=17111 or EventID=17115 or EventID=17117 or EventID=17118 or EventID=17125 or EventID=17126 or EventID=17135 or EventID=17136 or EventID=17137 or EventID=17147 or EventID=17152 or EventID=17162 or EventID=17164 or EventID=17176 or EventID=17177 or EventID=17201 or EventID=17573)]]</Suppress>\ | |
| <Suppress Path="Application">*[System[(EventID=17663 or EventID=17811 o |
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
| Param( | |
| [Parameter(Mandatory=$True,Position=1)][string]$pdfFile, | |
| [Parameter(Mandatory=$True,Position=2)][string]$eventFile | |
| ) | |
| #uses cPDF http://community.coherentpdf.com/ | |
| #the pdf file, cpdf, and the event file should be in the current directory | |
| #clean up any previously split ticket pdfs | |
| #splits a pdf $pdfFile by pages into files matching Ticket001.pdf, etc in the same directory |