Skip to content

Instantly share code, notes, and snippets.

View expiscornovus's full-sized avatar

Dennis Goedegebuure expiscornovus

View GitHub Profile
@expiscornovus
expiscornovus / TicksToUtc
Last active November 6, 2024 12:42
Ticks to UTC
addSeconds('0001-01-01',div(int(variables('Ticks')),10000000))
@expiscornovus
expiscornovus / SelectFileFromFileExplorer.robin
Last active March 31, 2021 11:20
Select File From File Explorer in Power Automate Desktop
UIAutomation.Click Element: appmask['Window \'File Upload\'']['Edit \'File name:\''] ClickType: UIAutomation.ClickType.LeftClick MousePositionRelativeToElement: UIAutomation.RectangleEdgePoint.MiddleLeft OffsetX: 90 OffsetY: -1
UIAutomation.FormFilling.PopulateTextField TextField: appmask['File Upload\'']['Edit \'File name:\''] Text: InvoiceFileName
UIAutomation.FormFilling.PressButton Button: appmask['Window \'File Upload\'']['Button \'Open\'']
@expiscornovus
expiscornovus / UISelectorsFileExplorer.html
Last active March 31, 2021 11:42
UI Selectors for File Explorer
## Group - Window 'File Upload'
:desktop > window[Name="%SharePointSiteName% - %DocumentLibraryName% - %DocumentLibraryViewName% — Mozilla Firefox"][Process="firefox"]
## UI Selector - Edit 'File name:'
> window[Class="#32770"][Name="File Upload"] > combobox[Class="ComboBox"][Name="File name:"] > edit[Class="Edit"]
## UI Selector - Button 'Open'
> window[Class="#32770"][Name="File Upload"] > button[Class="Button"][Name="Open"]
@expiscornovus
expiscornovus / get_windowssecurity.ps1
Created March 29, 2021 20:53
Start Change Password on RDP session
$shellapp = New-Object -ComObject Shell.Application
$shellapp.WindowsSecurity()
@expiscornovus
expiscornovus / new_serviceapplicationpools.ps1
Created March 29, 2021 20:56
Create New Service Application Pools in SharePoint 2010
Import-CSV .\serviceapplicationpools.csv | ForEach-Object {
$serviceapplicationpool = $_.Name
$processaccountname = $_.ProcessAccountName
New-SPServiceApplicationPool -Name $serviceapplicationpool -Account $processaccountname
}
@expiscornovus
expiscornovus / new_managedaccounts.ps1
Created March 29, 2021 20:58
Create New Managed Account in SharePoint 2010
Import-CSV .\managedaccounts.csv | ForEach-Object {
$username = $_.UserName
$password = $_.Password | ConvertTo-SecureString -asPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential($username,$password)
new-SPManagedAccount -Credential $credential
}
@expiscornovus
expiscornovus / customthememoss.css
Created March 29, 2021 21:03
Create custom theme MOSS
@import "/_layouts/1033/styles/ExpiscornovusTheme/theme.css"
@expiscornovus
expiscornovus / get_pagelayouts.ps1
Created March 29, 2021 21:09
Get the available page layouts of a web in SharePoint 2013 via PowerShell
Param(
[string]$weburl
)
$spweb = Get-SPWeb -Identity $weburl
$pubweb = [Microsoft.SharePoint.Publishing.PublishingWeb]::GetPublishingWeb($spweb)
$pagelayouts = $pubweb.GetAvailablePageLayouts() | Select Title,Name
$pagelayouts
$spweb.Dispose()
@expiscornovus
expiscornovus / update_ucccore.ps1
Created March 29, 2021 21:11
How to update Anywhere365 Unified Contact Center Core to version 3.0.15073.0
#1. Stop UCC Service
$uccservice = get-service -Name UnifiedContactCenterService
$uccservice | Stop-service
#2. Back-up UCC files, Dashboard & Attendant
Copy-Item "C:\Program Files\UCC" -Destination "C:\Install\UCC\Backup_UCC_Files" -Recurse
Copy-Item "C:\inetpub\wwwroot\Attendant" -Destination "C:\Install\UCC\Backup_Attendant" -Recurse
Copy-Item "C:\inetpub\wwwroot\Dashboard" -Destination "C:\Install\UCC\Backup_Dashboard" -Recurse
#3. Extract Zip update package
@expiscornovus
expiscornovus / verify_logfileaccess.ps1
Last active March 29, 2021 21:25
How to verify ULS log and Usage log file access in SharePoint 2013 via PowerShell
$usageservice = Get-SPUsageservice
$servers = Get-SpServer | ? {$_.Role -ne "Invalid"}
$usagelogdirunc = $usageservice.UsageLogDir -replace ':','$'
foreach
($server in $servers)
{
$testuncpath = '\\' + $server.Address + '\' + $usagelogdirunc
$testuncpath
get-acl -Path $testuncpath | select -expand access | ? {$_.IdentityReference -like "*WSS_WPG" -or $.IdentityReference -like "*WSS_Admin_WPG"}
# get-acl -Path $testuncpath | select -expand access | ? {$_.IdentityReference -like "*Administrators"}