Posts

Powershell to Create Custom theme for Modern SharePoint Pages

I used the theming designer to get me started with the theme color set. https://fabricweb.z5.web.core.windows.net/pr-deploy-site/refs/heads/7.0/theming-designer/index.html I then changed a few colors directly to more match the specific cooperate color codes. Easy as you please. #Set Admin Center URL $AdminCenterURL = "https://XXXXXXXXXXXXXXXXXXXXX.sharepoint.com/" #Connect to Admin Center Connect-PnPOnline -Url $AdminCenterURL -Interactive #Define the color palette $ThemePalette = @ { "themePrimary" = "#313842" ; "themeLighterAlt" = "#f5f6f7" ; "themeLighter" = "#d7dbe1" ; "themeLight" = "#b7bdc6" ; "themeTertiary" = "#e26653" ; "themeSecondary" = "#de543e" ; "themeDarkAlt" = "#2c333c" ; "themeDark" = "#252b32" ; "themeDarker" = "#1b1f25...

PowerShell PGP Decryption

 In this case, I am taking an PGP encrypted file, decrypting it, creating an archived version of the file, and then moving it to its new location Gunna be honest, this code is SUPER temperamental. Sometimes it doesn't want the credentials. Some times it won't run it with out it. Use at your own risk. It works, it just...is a diva as far as scripts go. #Date Variables $CurrentDate = Get-Date $Date_Append = Get-Date -Format "yyyyMMdd" $DatetoDelete = $CurrentDate .AddDays(-182) ##Declared locations, separated for simi reusability $Key_Location = "YOUR-KEY-HERE" $Source_Location = 'WHERE-IS-THE-FILE.CSV' $Destination_Location = 'WHERE-IS-IT-GOING' $CopySource_Location = $Destination_Location + "FILENAME" $Archive_Location = "ARCIVE-GO-HERE\" $Archive_FilePath = $Archive_Location + "MY-fILENAME" + $DateF_Append + ".csv" $Archive_SourceFilePath = $Archive_Location + "MYFILE.CSV...

Posting Code Stubs onto blogger.

Image
 This is kind of an easy one, but since I found it to be a problem while I was trying to upload my last code block....you know,  I might as well post it here as well. http://hilite.me/ Nice. I love it when the tool you need just already exists, you needed to know where.

Automated Removal of Old Blob Storage with Powershell.

This was a request/refactoring of code from a DBA I know, and making it work in our environment. Pretty simple, but still required a bit of tinkering. Ensure the module is installed, and set the alias just incase. (For reusability) Set the Containers and the Accounts. Set the Time Context. Minor note, the code I was working from was "like blob" but the script found no hits. Looking at the directory manually I saw everything was "blockblob" so that is what we aimed the script to remove. Again this is pretty straightforward, Just took some time to get it just so. #Ensure Azure Installed if ( Get-Module -ListAvailable -Name AZ) { Write-Host "Azure Module Installed" } else { Write-Host "Installing Azure module" Install-Module Install-Module Az -Force -AllowClobber Import-Module Az } Enable-AzureRmAlias Connect-AzAccount $container = "YOUR_CONTAINER" $StorageAccountName = "YOUR_ACCOUNT_NAME" $bakH...

SharePoint 2013 Workflow Status Codes

So this is a quick little post, but it can be a little hard to find sometimes. In your list with your workflows there is a set of status codes tied to their workflow. Honestly this is as much for me as it is for you. Here is the list of the status codes used to maintain the workflow statuses.  Status - Value Not Started 0 Failed on Start 1 In Progress 2 Error Occurred 3 Canceled 4 Completed 5 Failed on Start ( retrying ) 6 Error Occurred ( retrying ) 7 Canceled 15 Approved 16 Rejected 17

JavaScript Broadcast Calendar Calculation

Image
Holy Crap! How long has it been since I posted anything here? Looks like a few months.Sorry about that. I happened to get kind of busy with a new and interesting project that consumed a lot of my time, and I didn't have anything useful I could share. Well good news, I DO have something to share. Broadcast Calendars. In the world of TV, Radio, & Advertising, they decided that the calendar we all use was not good enough.So they had to make their own calendar for the planning and purchase of programs (new & syndication) and advertising. Lets go over a how the rules of the calendar work. Every week in the broadcast calendar starts on a Monday and ends on a Sunday Every month has either four or five such weeks. Broadcast calendar months thus have either 28 or 35 days. The first week of every broadcast month always contains the Gregorian calendar first of the month. So thinking about this from an algorithm stand point, lets discuss how we can work with it. We only r...

Exporting Publishing Sites as Templates in SharePoint 2013

Image
I hate spring. Head congestion and constant running nose. So I'll be the first to admit, I am NOT at my prime today.  But with a few cups of coffee and heavy metal later, I can start getting some work done. I wanted to test my custom site in our test environment where we are rebuilding a new design/look & feel. So I to do this, I wanted to export my site as a template solution...but It is in a publishing site. No fear, this is actually pretty easy, but not super obvious. Boot up SharePoint Designer, and navigate to the site you want to export.       Find “SaveSiteAsTemplateEnabled” in Site Options (see below).    Click the Modify button and change this setting to “true” then a pply the Setting once done. Next, navigate to this URL (change appropriately for your site)  http://YourWebApp/YourSubSite/_layouts/15/savetmpl.aspx  This gets around the fact that the option for saving a sub site doesn't exist in site settings fo...