• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Tachytelic.net

  • Sco Openserver
    • Sco Unix Support
    • SCO Openserver Installation ISOs
    • SCO Openserver Binaries
    • Add a Hard Drive to an Openserver 5 Virtual Machine
    • Install SCO Vision SQL-Retriever ODBC Driver on Windows 10
    • License Expired on Virtual SCO Openserver Installation
    • How to reset the root password on SCO Openserver 5
  • Scripting
    • PowerShell
      • Add leading zeros
      • Check if a File Exists
      • Grep with Powershell
      • Create Environment Variables
      • Test for open Ports
      • Append to a Text File
    • VBScript
      • Check if a File Exists
      • lpad and rpad functions
      • Windows Update E-Mail Notification
  • Office 365
    • Connect to Office 365 with PowerShell
    • Add or remove an email alias using Powershell
    • Change Primary email address of Active Directory user
    • How to hide an AD user from the Global Address List
    • How to hide mail contacts from the Global Address List
    • Change the primary email address for an account with PowerShell
    • Change Primary email address of an AD User
    • Grant a single user access to access to all calendars
    • Forward email to an external address using Powershell
    • Convert shared mailbox to user mailbox with Powershell
  • Get in Touch
  • About Me
    • Privacy Policy

Uncategorized

Remove unwanted characters from a string in Power Automate

October 30, 2020 by Paulie Leave a Comment

This post explains how to remove unwanted characters from a string in a Power Automate flow. These can be regular characters or unprintable special characters, such as control codes that you need to strip out.

The example string:


<note>
	<to>[email protected]</to>
	<from>Michael Knight</from>
	<heading>Reminder</heading>
	<body>Don't forget to clean KITT this weekend!!!
	</body>
</note>

I want to remove the apostrophe, exclamation marks and non-printable characters.

You can see the non-printable characters in Notepad++ :

First of all, let’s take a look at the basic flow structure:

Image of a Power Automate Flow to remove unwanted characters

In the above example I have only put two characters in the array, like this:

[ "\u0027", "!" ]

This requires some explanation, you might be wondering what the first element in the array is!

\u0027 is the Unicode representation of the apostrophe character. The complete array to remove everything I want to clean from this string is:

[ "\u0001", "\u0007", "\u0027", "!" ]

It’s important to know how to remove non-printable characters or control codes, because you cannot type them into the expression editor in Power Automate. So using the Unicode representation makes it possible.

A note of caution, if you load up a big array of unwanted characters like this:

[ "\u0001", "\u0007", "'", "!", "@", "£", "^", "=", ",", "%", "[", "]", ";", "~", "?", "<", ">", "|", "`", "¬", "/" ]

Then the apply to each loop will take longer to execute. So try to keep the number of replacements down to the minimum possible. If you want more speed you can do it all in a single action with a nested replace, but it is more difficult to read.

Hope this helps.

Filed Under: Uncategorized

Tips for a Tidy Communications Cabinet

September 29, 2019 by Paulie Leave a Comment

A cluttered communications cabinet is unpleasant to look at, confusing and difficult to work with. I’ve had to tidy up a few recently and it is a strangely satisfying task. Here are a few tips and some photos that show my basic approach.

  • Use short cables between the patch panel and the network switches.
  • Place 48-Port switches between port patch panels.
  • Use Velcro ties to bind groups of cables together.
  • Photo of untidy communications cabinet
    Before
  • photo of tidy communications cabinet
    After

As you can see, the layout before was really difficult to work with, mainly due to the patch cable lengths. It was setup as follows (from top to bottom):

  • 2 x 24 Port Patch Panels
  • 1 x Cable Management Bar
  • 1 x 24 Port Patch Panel
  • 2 x 48 Port Netgear Switches
  • 1 x Cable Management Bar

Even with shorter cables this layout would have still been a mess because so much unnecessary routing would be required. By moving the switches to sit between the patch panels you can patch every port without needing to route the cables anywhere other than the switch directly below or above it. In this example the switches were also swapped out for 48-Port UniFi PoE Switches. The patch cables are 25cm.

The next example isn’t as visually pleasing, because:

  • The cabinet is too small. I couldn’t fit the required number of cable management bars.
  • The existing analogue phone system forces patching to particular ports.
  • I just didn’t have enough time.
  • Before
  • During
  • After

It’s still an improvement and easier to work with, but I wasn’t completely happy with it. Hopefully they will be switching over to a 3CX VoIP system soon so at that point it can be completely reorganised.

The final one didn’t have a before photo, but it turned out simple and nice:

Image of UniFi Switches in Communications cabinet patched with 25cm Yellow cables.
There are 7 UniFi Switches in total to cover every port in the building

So if possible, make sure you have:

  • Plenty of space.
  • Lots of different cable lengths.
  • Make effective use of cable management bars.

Let me know your ideas in the comments.

Filed Under: Uncategorized

VPN connections do not work after Windows 10 May 2019 Update

June 13, 2019 by Paulie 51 Comments

I received the latest Windows 10 update today (May 2019 – Build 1903) and found that none of my existing VPN connections worked. When I try to connect to one of them, it just says “connecting” and eventually stops without producing an error.

I have not found a solution to this, but I have found a very easy workaround. This is by using a tool that has been in Windows Since at least Windows NT 4.0 Called rasphone.exe. I actually prefer the simple interface it provides.

How to get access to your existing VPN connecitons

  • Create a new shortcut on your desktop to:
    C:\Windows\System32\rasphone.exe
  • Double click your new shortcut and you should get this interface:
    Image showing rasphone.exe running on Windows 10 1903 update
  • Try your VPN connection.

This will give you access to the traditional dial-up tool which seems to work perfectly. It’s quite clear that something in the update is blocking access to the credentials window appearing and therefore the connection never completes.

It seems strange to workaround an issue with the very latest version of Windows 10 by using a tool that has been around for over 20 years!

Filed Under: Uncategorized Tagged With: Windows 10

Office 365: 550 5.7.1 RESOLVER.RST.AuthRequired when emailing a mail enabled public folder

July 1, 2014 by Paulie Leave a Comment

A recent change in Exchange online seems to have caused a problem with mail enabled public folders receiving messages from people outside of the organisation. It has never been necessary with Office 365/Exchange Online to give create permissions to the anonymous or default users , you could instead set the mail flow settings of the public folder to allow anonymous access.

You may see the following bounce message when sending to a mail enabled public folder:

Delivery has failed to these recipients or groups:

Your message wasn’t delivered due to a permission or security issue. It may have been rejected by a moderator, the address may only accept email from certain senders, or another restriction may be preventing delivery. For more tips to resolve this issue see DSN code 5.7.1 in Exchange Online. If the problem continues contact your help desk.

5.7.1 RESOLVER.RST.AuthRequired; authentication required [Stage: CreateMessage]>’

Of course it is possible and easy to set permissions for the public folder from Outlook to solve this problem, but doing this does not seem to be working for everyone. Some people are reporting success with it, but others not.

Setting the public folder permissions with PowerShell fixes the problem, but I cannot understand why there is a difference.

Setting Offiec 365 Public Folder Permissions with Powershell

In order to fix this problem you have to grant create permissions to anonymous and the default user. The Powershell cmdlet to do this is Add-PublicFolderClientPermission.

After connecting to Office 365 Remote Powershell as described here, you can run the following commands:

Add-PublicFolderClientPermission -identity "\test public folder" -User Anonymous -AccessRights CreateItems
Add-PublicFolderClientPermission -identity "\test public folder" -User Default -AccessRights CreateItems

Once you have added the permission it’s probably best to give it a quick check with:

Get-PublicFolderClientPermission -identity "\test public folder"

Hope this helps.

Filed Under: Uncategorized Tagged With: E-Mail, Exchange, Office 365, Powershell

Changing the format of date parameters on a SQL Server 2012 reporting services report that is Sharepoint Integrated

January 15, 2013 by Paulie 20 Comments

Hit a snag today trying to set the format on date parameters that drive SSRS 2012 reports – at first I thought it would be simple to fix but after searching around for solutions, didn’t come up with much.

The specific problem I was/am having is that when you use Date/Time parameters to drive a report built in SSRS 2012 the date formats always revert to US format after choosing a date from the calendar control – making your date selections incorrect, or sometimes invalid, depending on the dates you have chosen. I don’t know if this problem exists when using the native viewer, but certainly many people have reported it in SharePoint integrated mode.

Changing the Language property of the report, the regional settings of the client or the regional settings of the server all make no difference (though I suspect that they also have to be set correctly).

The only solution that I found is to hard code the UICulture value into RSViewerPage.aspx, which on my system was found in:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ReportServer

The modified code looks like this:

<%@ Page language="C#" Codebehind="RSViewerPage.aspx.cs" AutoEventWireup="false" Inherits="Microsoft.ReportingServices.SharePoint.UI.RSViewerPage,Microsoft.ReportingServices.SharePoint.UI.ServerPages,Version=11.0.0.0,Culture=neutral,PublicKeyToken=89845dcd8080cc91" UICulture="en-GB" %>

Changing the UICulture worked for me, but introduced a problem of its own – I lost the formatting of the sidebar on report viewer, after a little digging I found out why. As you may not be using “en-GB” you can also use the method to adapt it to your region.

The reason that formatting vanished is because I set my UICulture to en-GB which according to this page:

http://technet.microsoft.com/en-us/library/cc287874(v=office.12).aspx” title=”http://technet.microsoft.com/en-us/library/cc287874(v=office.12).aspx

Has a locale ID of 2057, previously the page source all referred to 1033 which is “English (United States)”. Having changed the UICulture it is now looking for folder “2057, which does not exist. There is a Styles subfolder which contains styles for each locale, on my system the full path to this was:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\ReportServer\styles

There are lots of entries in that folder for many different locales, but not one for 2057 (Presumably because it is the same as en-US for the most part).

I simply copied the contents of 1033 to a new folder called 2057 and the formatting came back.

Pretty simple to fix when you have dug through the system and found all the relevant files, but not easy to discover. I’m not really happy with this fix and would be very pleased to hear of any better, more official ways of fixing the problem. Surely there are lots of people in other regions not using the US date formats for their Sharepoint Integrated reports. I’m not fond of manually tweaking the report viewer code.

Filed Under: Uncategorized

  • Go to page 1
  • Go to page 2
  • Go to Next Page »

Primary Sidebar

Link to my LinkedIn Profile

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 107 other subscribers.

Go to mobile version