URL Encoded Characters

      backspace      %08
      tab            %09
      linefeed       %0A
      creturn        %0D
      space          %20
      !              %21
      "              %22
      #              %23
      $              %24
      %              %25
      &              %26
      '              %27
      (              %28
      )              %29
      *              %2A
      +              %2B
      ,              %2C
      -              %2D
      .              %2E
      /              %2F
      0              %30
      1              %31
      2              %32
      3              %33
      4              %34
      5              %35
      6              %36
      7              %37
      8              %38
      9              %39
      :              %3A
      ;              %3B
      <              %3C
      =              %3D
      >              %3E
      ?              %3F
      @              %40
      A              %41
      B              %42
      C              %43
      D              %44
      E              %45
      F              %46
      G              %47
      H              %48
      I              %49
      J              %4A
      K              %4B
      L              %4C
      M              %4D
      N              %4E
      O              %4F
      P              %50
      Q              %51
      R              %52
      S              %53
      T              %54
      U              %55
      V              %56
      W              %57
      X              %58
      Y              %59
      Z              %5A
      [              %5B
      \              %5C
      ]              %5D
      ^              %5E
      _              %5F
      `              %60
      a              %61
      b              %62
      c              %63
      d              %64
      e              %65
      f              %66
      g              %67
      h              %68
      i              %69
      j              %6A
      k              %6B
      l              %6C
      m              %6D
      n              %6E
      o              %6F
      p              %70
      q              %71
      r              %72
      s              %73
      t              %74
      u              %75
      v              %76
      w              %77
      x              %78
      y              %79
      z              %7A
      {              %7B
      |              %7C
      }              %7D
      ~              %7E
      ¢              %A2
      £              %A3
      ¥              %A5
      |              %A6
      §              %A7
      «              %AB
      ¬              %AC
      ¯              %AD
      º              %B0
      ±              %B1
      ª              %B2
      ,              %B4
      µ              %B5
      »              %BB
      ¼              %BC
      ½              %BD
      ¿              %BF
      À              %C0
      Á              %C1
      Â              %C2
      Ã              %C3
      Ä              %C4
      Å              %C5
      Æ              %C6
      Ç              %C7
      È              %C8
      É              %C9
      Ê              %CA
      Ë              %CB
      Ì              %CC
      Í              %CD
      Î              %CE
      Ï              %CF
      Ð              %D0
      Ñ              %D1
      Ò              %D2
      Ó              %D3
      Ô              %D4
      Õ              %D5
      Ö              %D6
      Ø              %D8
      Ù              %D9
      Ú              %DA
      Û              %DB
      Ü              %DC
      Ý              %DD
      Þ              %DE
      ß              %DF
      à              %E0
      á              %E1
      â              %E2
      ã              %E3
      ä              %E4
      å              %E5
      æ              %E6
      ç              %E7
      è              %E8
      é              %E9
      ê              %EA
      ë              %EB
      ì              %EC
      í              %ED
      î              %EE
      ï              %EF
      ð              %F0
      ñ              %F1
      ò              %F2
      ó              %F3
      ô              %F4
      õ              %F5
      ö              %F6
      ÷              %F7
      ø              %F8
      ù              %F9
      ú              %FA
      û              %FB
      ü              %FC
      ý              %FD
      þ              %FE
      ÿ              %FF

Fleanser – improves our productivity in migrating file shares to SharePoint Online

HuonIT excels in File Share migration projects with the introduction of custom developed cleansing and mirroring tool. Internally named Fleanser v1.0.

Our tool replaces part of the functionality provided by ShareGate solutions in migrating file share to SharePoint online environment.

Fleanser runs, various analytic operations in file paths to cleanse and shorten them intelligently when required. It also generates various analytic reports during cleanse process to back track on action applied against each file/folder members.

We tested our first version of this tool (functional edition) today for a client and we immediately saw the value we could add to our customers.

Proud to be a creator of this tool. We have already planned to add more functionalities to this tool in the subsequent releases.

Untitled-3

PowerShell Upload File to Style Library & Sub-Path Location

function UploadFile2StyleLibraryLocation($WebUrl, [String] $SourceFilePath, [String] $StyleLibrarySubPath) { # Open web $web = Get-SPWeb $WebUrl $file = Get-Item $SourceFilePath write-host "Started Uploading File..." $file.FullName # Open file $fileStream = ([System.IO.FileInfo] (Get-Item $file.FullName)).OpenRead() # Open Style Library $folder = $web.getfolder("Style Library") # Check whether the file is already exists? $File2Replace = $web.GetFile($folder.Url + $StyleLibrarySubPath + $file.Name) if($File2Replace.Exists -eq $true){ $File2Replace.CheckOut() } # Add the file $spFile = $folder.Files.Add($folder.Url + $StyleLibrarySubPath + $file.Name, [System.IO.Stream]$fileStream, $true) # Check in $spFile.CheckIn("Checkin by deploy script 1.7.0") # Finally publish the file $spFile.Publish("Published by deploy script 1.7.0") $MessageFilePath = $WebUrl + "/" + $folder.Url + $StyleLibrarySubPath + $file.Name $MessageFileName = $file.Name write-host $MessageFilePath write-host "Successfully uploaded file $MessageFileName" $fileStream.Close(); $web.Dispose() }

 

Usage:

UploadFile2StyleLibraryLocation -WebUrl "http://win12sp13"` -SourceFilePath "C:\mywork\pwcs-customer\Phase2Development-V1_7_0\Readify.Pwcs.Deployment\V1.7.0\_package\Deploy\Content\promotion.js"` -StyleLibrarySubPath "/Readify/ClientTemplates/"

Disable Mobile View on all SPWeb

Param([string]$WebUrl) if($WebUrl -eq ""){ write-host "Please input `$WebUrl` parameter value." -ForegroundColor Red; exit -1 } [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null $WebApp = Get-SPWebApplication $WebUrl foreach($site in $WebApp.Sites){ foreach($web in $site.AllWebs){ $WUrl = $web.Url; Write-Host "Disabling mobile view on web - $WUrl..." -ForegroundColor Gray -NoNewline Disable-SPFeature -identity "d95c97f3-e528-4da2-ae9f-32b3535fbb59" -URL $WUrl -Force -Confirm:$false -ErrorAction SilentlyContinue write-host "done." -ForegroundColor Green } } Write-Host "End of exection" -BackgroundColor Green -ForegroundColor White

Change/Rename Reusable SharePoint workflow template title

When saving a template of SharePoint designer workflow, it creates a pretty ugly title including the site it was created and all. I wanted to change this title to make it standard as our other feature naming conventions:

For tools related to repackaging the wsp file, please see my earlier article Here.

1. Copied the "SiteApprovalWorkflow.wsp" to C:\mywork\workbench
2. Extracted the WSP file using 7-zip > content extracted to "C:\mywork\workbench\SiteApprovalWorkflow"
3. Opened the file "C:\mywork\workbench\SiteApprovalWorkflow\Site Approval WorkflowListInstances\Feature.xml" and edited the Title="Workflow template &quot;Site Approval Workflow&quot; from web template &quot;Channel Home&quot;" to Title="Readify.Pwcs.Collabration.TeamSiteApprovalWorkflow", save the file.
4. Copied the file "makeddf.exe" to "C:\mywork\workbench"
5. Opened a command prompt @C:\mywork\workbench>
6. Executed the command – makeddf /p SiteApprovalWorkflow /d SiteApprovalWorkflow.ddf /c SiteApprovalWorkflow.cab

MakeDDF 1.0.1 (r119) · http://www.Stum.de
_________________________________________
CAB Filename: SiteApprovalWorkflow.cab
Base Path: SiteApprovalWorkflow\
DDF File Name: C:\mywork\workbench\SiteApprovalWorkflow.ddf
Using Absolute Path names: no

Finished execution on 2015-03-12 12:08:51

MakeDDF 1.0.1 (r119) · http://www.Stum.de
_________________________________________
CAB Filename: SiteApprovalWorkflow.cab
Base Path: SiteApprovalWorkflow\
DDF File Name: C:\mywork\workbench\SiteApprovalWorkflow.ddf
Using Absolute Path names: no

Finished execution on 2015-03-12 12:08:51

7. Copy the newly created file "C:\mywork\workbench\SiteApprovalWorkflow.ddf" into "C:\mywork\workbench\SiteApprovalWorkflow" folder
8. cd C:\mywork\workbench\SiteApprovalWorkflow
9. makecab /f "SiteApprovalWorkflow.ddf"
10. file gets created at: "C:\mywork\workbench\SiteApprovalWorkflow.cab"
11. Rename that to .WSP

Add/Update SP (SharePoint) Site Quota Template using PowerShell

Please see the reusable script:

$ver = $host | select version if ($ver.Version.Major -gt 1) {$host.Runspace.ThreadOptions = "ReuseThread"} if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin "Microsoft.SharePoint.PowerShell" } function AddUpdate-SPQuotaTemplate{ <# .Synopsis This advanced function add/update Site Quota Template. .Description This function uses .NET code to instantiate an instance of an SPQuotaTemplate class. An instance of the SPWebService class is instantiated and the Quota Template is added/updated to the Quota Templates Collection. .Example C:\PS>AddUpdate-SPQuotaTemplate -AddTemplateName "Custom" -UpdateTemplateName "" -StorageMaximumLevel 2GB -StorageWarningLevel 1GB -UserCodeMaximiumLevel 100 -UserCodeWarningLevel 75 This example creates an SP Quota Template called Custom with a maximum size of 2GB and a warning size of 1GB. Sandboxed solutions are limited to 100, with a warning level of 75. .Example C:\PS>AddUpdate-SPQuotaTemplate -AddTemplateName "Custom" -UpdateTemplateName "" -StorageMaximumLevel 4GB -StorageWarningLevel 3GB This example creates an SP Quota Template called Custom with a maximum size of 4GB and a warning size of 3GB .Notes Name: AddUpdate-SPQuotaTemplate Author: Riyaz Sheriff Last Edit: 2/09/2015 Keywords: Quota Template, Quotas and Locks .Link http://consultantpoint.wordpress.com #Requires -Version 2.0 #> [CmdletBinding()] Param( [Parameter(Mandatory=$true)][String]$AddTemplateName, [Parameter(Mandatory=$false)][String]$UpdateTemplateName, [Parameter(Mandatory=$true)][Int64]$StorageMaximumLevel, [Parameter(Mandatory=$true)][Int64]$StorageWarningLevel, [Parameter(Mandatory=$false)][System.Double]$UserCodeMaximumLevel, [Parameter(Mandatory=$false)][System.Double]$UserCodeWarningLevel ) # Instantiate an instance of an SPQuotaTemplate class # Write-Verbose "Instantiating an instance of an SPQuotaTemplate class" $contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService $quotaTemplate = $contentService.QuotaTemplates[$AddTemplateName]; # Got an Instance of the SPWebService Class # Write-Verbose "Got an instance of an SPWebService class" if($quotaTemplate -ne $null){ # Ensure before renaming $expectedNewTemplate = $contentService.QuotaTemplates[$UpdateTemplateName]; if($expectedNewTemplate -eq $null -and $UpdateTemplateName -ne ""){ # New name quota template is already found # Write-Verbose "A Quota template with the name $UpdateTemplateName does not exisit...." $quotaTemplate.Name = $UpdateTemplateName $quotaTemplate.StorageMaximumLevel = $StorageMaximumLevel $quotaTemplate.StorageWarningLevel = $StorageWarningLevel $quotaTemplate.UserCodeMaximumLevel = $UserCodeMaximumLevel $quotaTemplate.UserCodeWarningLevel = $UserCodeWarningLevel $contentService.Update() Write-Host "Quota Template $AddTemplateName was updated successfully" -foreground Green } else{ Write-Host "Template $UpdateTemplateName already exists, cannot rename...." -ForegroundColor Yellow } } else{ # Set the Properties # Write-Verbose "Setting properties on the Quota object" $newQuotaTemplate = New-Object Microsoft.SharePoint.Administration.SPQuotaTemplate $newQuotaTemplate.Name = $AddTemplateName $newQuotaTemplate.StorageMaximumLevel = $StorageMaximumLevel $newQuotaTemplate.StorageWarningLevel = $StorageWarningLevel $newQuotaTemplate.UserCodeMaximumLevel = $UserCodeMaximumLevel $newQuotaTemplate.UserCodeWarningLevel = $UserCodeWarningLevel # Get an Instance of the SPWebService Class # Write-Verbose "Getting an instance of an SPWebService class" $contentService =[Microsoft.SharePoint.Administration.SPWebService]::ContentService $contentService.QuotaTemplates.Add($newQuotaTemplate) $contentService.Update() Write-Host "Quota Template $AddTemplateName added successfully" -foreground Green } } # Reconfigure if found, if not add a new one. AddUpdate-SPQuotaTemplate -AddTemplateName "Small Team Site (2GB)" ` -UpdateTemplateName "" ` -StorageMaximumLevel 2GB ` -StorageWarningLevel 1740MB ` -UserCodeMaximumLevel 300 ` -UserCodeWarningLevel 300 AddUpdate-SPQuotaTemplate -AddTemplateName "Medium Team Site (5GB)" ` -UpdateTemplateName "" ` -StorageMaximumLevel 5GB ` -StorageWarningLevel 4352MB ` -UserCodeMaximumLevel 300 ` -UserCodeWarningLevel 300 AddUpdate-SPQuotaTemplate -AddTemplateName "Large Team Site (10G)" ` -UpdateTemplateName "" ` -StorageMaximumLevel 10GB ` -StorageWarningLevel 8704MB ` -UserCodeMaximumLevel 300 ` -UserCodeWarningLevel 300

SharePoint Developer box configured with email send/receive capability using SMTP Service + Visendo SmtpExtender

So you are one of those guy who want to setup a simple email send/receive capability to test various SharePoint notification mechanism for bunch of domain users.

The following were configured and tested in an environment of:

1. Windows Server 2012 R2 + Active Directory Installed + Required users added.

2. SharePoint 2013

3. Outlook 2013 client

Steps:

1. First of all you need to configure SMTP service in your dev. box.

https://technet.microsoft.com/en-us/library/cc263462%28v=office.15%29.aspx

Note: Though you have an engine which can forward messages across, you still don’t have the POP3 service available within your box (the POP3 service no longer comes with windows server, which was available back in those days when Windows Server 2003 was there).

so how do you get that as most of your client would look for POP3 at a minimal. this is where the Visendo comes into play (btw, if you want to really configure a fully fledged server go ahead and try the exchange server, but for development purposes you really don’t want to spend time configuring exchange isn’t it?.

Test whether the SMTP service is ready before moving to next step – :

2. Install the Visendo following the steps marked in here (the version I used was V1.1.2.637 Demo x64)

Refer to the manual I used here – https://www.dropbox.com/s/y54mkpojerlxfv6/VisendoSmtpExtender_manual_en.pdf?dl=0

The installation binary is here –

https://www.dropbox.com/s/wbrs0wu804xadql/VisendoSMTPExtender_Plus_x64.msi?dl=0

 

My setting for a test user tariqa@readylab.net is as follows:

image

image

Any settings you play with either Visendo / SMTP service, you need to restart both services

To restart Visendo service (click the Settings top tree node in the UI):

image

To restart the SMTP service:

WIN + R > Services.msc  > Look for “Simple Mail Transfer Protocol (SMTP) (right click and restart):

image

 

By now I am assuming that you have added necessary users to the Visendo to try the next step:

3. Configure outlook mail client to send/receive emails (since the idea is to test send/receive email for multiple users, I have set the configuration of outlook mail to prompt to choose the profile at start up):

How to make outlook prompt to choose profile:

image

image

 

Now to configure my test user tariqa@readylab.net, follow the screenshots:

image

image

image

 

image

 

image

 

Tested sending and receiving emails from/to outlook client:

image

 

Finally Testing the whole with SharePoint:

$email = "tariqa@readylab.net" $subject = "SharePoint routed email test" $body = "Email test body.. yey yey" $site = New-Object Microsoft.SharePoint.SPSite "http://pwcs.com.au" $web = $site.OpenWeb() [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,0,0,$email,$subject,$body) // A True or False will confirm the message has been sent or not

 

Throw it all to a console:

image

 

Observation/outcome:

1. Worried since the email did not come to outlook Sad smile, then started the usual check at the drop folder location:

– Found an unserved .eml reflecting the time that the email was sent. – wait.. just disappeared, hmm… just now the batch processing got invoked

2. now the email is received at the outlook end.

image

 

Happy configuring….

Some useful links I referred:

http://weblogs.asp.net/hpreishuber/free-pop3-for-windows-2012-server

http://www.visendo.com/download/visendosmtpextender/docs/VisendoSmtpExtender_manual_en.pdf

http://blogs.perficient.com/microsoft/2010/11/email-configuration-within-a-sharepoint-2010-development-environment/

http://www.falconitservices.com/support/KB/Lists/Posts/Post.aspx?ID=105

https://technet.microsoft.com/en-us/library/cc732046%28v=ws.10%29.aspx

http://blogs.msdn.com/b/pareshg/archive/2010/04/23/how-to-configure-incoming-and-outgoing-emails-in-sharepoint-server-2010.aspx

http://webvaultwiki.com.au/(S(02oa34jugewqyznj3f0qg1q3))/Default.aspx?Page=Switch-Between-Multiple-Outlook-Profiles&NS=&AspxAutoDetectCookieSupport=1

Sending email from SharePoint on-premises via Office 365 – Client SMTP Submission

Installing a local SMTP Relay

The first step is to install an IIS SMTP server that will be used for relaying messages from SharePoint. This can be accomplished by using the ‘Add Roles and Features’ wizard, after completion will add a new option “Internet Information Services (6.0)” in the Server Manager ‘Tools’ menu. This is the interface by which we’ll configure the SMTP server, pictured below:

 

Configure SMTP Virtual Server Settings

By default the server listens to all addresses on port 25 which is the default SMTP server port, and Anonymous access is enabled; no changes are required to either of those items for our scenario. However, to ensure that we don’t relay messages from any machine we’ll limit the systems that are able to connect to and send through our server. From the “[SMTP Virtual Server #1] > Properties > Access” tab, click the “Connection” button which brings up the following window:

 

Be sure to specify the IP Address of each of the servers from which messages will be sent. Typically, multiple IP addresses are bound to each SharePoint server to support SSL bindings – be certain to list each of the addresses. In this screenshot, we’ve configured the SMTP Server to allow connections from two of our SharePoint servers.

Next, we’ll also ensure that only our two systems are allowed to relay messages through the SMTP server, which is accomplished by clicking on the “Connection” button on the same “Access” tab of the server properties. Note that we have the same two IP addresses listed, allowing only those two machines to relay:

 

From here, we need to configure the Office 365 mailbox username/password that the SMTP Server will use when sending messages. This is configured in the “Delivery” tab, using the “Outbound Security” button. Be sure to enter valid credentials for your Office 365 user, and if it’s a newly-created user make note that you’ll need to change the initial password on first login. If you don’t do this, mail will not send despite your best efforts!

 

Next we need to tell the server to use TCP port 587 when attempting to connect to Office 365, which is set in the “Outbound Connections” option of the “Delivery” tab:

 

Lastly, we need to specify which server to send mail through, and we do this by clicking the “Advanced” button on the “Delivery” tab. Be sure to specify the smart host as smtp.office365.com and clear the option to “Attempt direct delivery before sending to smart host”: this will ensure that all outbound mail will be sent via Office 365:

 

Configure Outgoing E-Mail Settings in SharePoint

Finally, we need to let SharePoint know about our new SMTP Server, which is done via Central Administration > System Settings > Outbound E-Mail Settings, as pictured below. Note that I’ve blurred out the values to protect the innocent, but you need to be certain to specify the servername, and your Office 365 mailbox user in the From address.

 

At this point, we’re ready to test our configuration and we’ll use PowerShell on the SharePoint server to do so. This way we can be sure that each component in our configuration is working, from the SharePoint settings through to the Office 365 mailbox. Open a SharePoint Management Shell and run the following PowerShell snippet:

$sdo = new-object System.collections.specialized.stringdictionary $sdo.add("to","raymond@dynamicowl.com") $sdo.add("from","sharepoint@office365domain.com") $sdo.add("Subject","Test message from SharePoint") $web = get-spweb "https://intranet" $messagebody = "This is a test message from SharePoint on-prem" [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,$sdo,$messagebody)

The output of the command will return “True” (and you’ll receive an email message) if it was successful; “False” indicates that something has gone wrong and the message was not delivered.

When things go wrong

In our experience, there are a few items that you’ll want to verify if outbound email is not flowing as expected, including:

  • the SMTP Server service is set to “Manual” start by default; be sure to change this to “Automatic” so that the service starts upon a reboot of your server
  • the Windows Server may require a server certificate in order for TLS to be used; this will generate an error in the Event Log and be evidenced by the SMTP Server Properties “Secure Communication” section of the “Access” tab indicating that no certificate can be found for TLS

Conclusion

E-mail is still a critical communication method in today’s business world, and moving email services to the cloud is more common than ever. We can still send email from an on-premises SharePoint server via Office 365 by setting up a local relay and sending mail from an Office 365 mail-enabled user.

BAT SCRIPT TO OPEN SQL SERVER PORTS IN THE FIREWALL

rem ******************code start******************************
 
@echo off 
sc config MpsSvc start= demand 
sc start MpsSvc
 
echo. *** OPENING SQL SERVER PORTS IN THE FIREWALL *** 
echo. source Mohamed Riyaz.
echo. 
echo. Note for Named Instances – SQL mirroring – Dynamic Ports and the firewall 
echo. see http://msdn.microsoft.com/en-us/library/cc646023(v=SQL.100).aspx#BKMK_programs 
echo. You will need to open firewall ports for your mirroring endpoints and possibly dynamic ports 
echo. 
echo. 
echo. Opening SQL Server TCP 1433 
netsh advfirewall firewall add rule name=”SQL Server (TCP 1432)” dir=in action=allow protocol=TCP localport=1433 profile=domain 
echo. 
echo. Opening SQL Admin Connection TCP 1434 
netsh advfirewall firewall add rule name=”SQL Admin Connection (TCP 1434)” dir=in action=allow protocol=TCP localport=1434 profile=domain 
echo. 
echo. Opening SQL Service Broker TCP 4022 
netsh advfirewall firewall add rule name=”SQL Service Broker (TCP 4022)” dir=in action=allow protocol=TCP localport=4022 profile=domain 
echo. 
echo. Port 135 
netsh advfirewall firewall add rule name=”SQL Debugger/RPC (TCP 135)” dir=in action=allow protocol=TCP localport=135 profile=domain 
echo. 
echo. Opening SQL Browser UDP 1434 
netsh advfirewall firewall add rule name=”SQL Browser (UDP 1434)” dir=in action=allow protocol=UDP localport=1434 profile=domain 
echo. 
echo. Opening Analysis Services TCP 2383 
netsh advfirewall firewall add rule name=”Analysis Services (TCP 2383)” dir=in action=allow protocol=TCP localport=2383 profile=domain 
echo. 
echo. Opening SQL Browser TCP 2382 
netsh advfirewall firewall add rule name=”SQL Browser (TCP 2382)” dir=in action=allow protocol=TCP localport=2382 profile=domain 
echo. 
echo. ***Done ***
 
sc stop MpsSvc 
sc config MpsSvc start= disabled
 
rem ******************code end******************************