tag:blogger.com,1999:blog-275819382024-02-20T21:12:15.908+01:00Techvier - Computer ManagementReflections over the current computer issues from an struggling network technicianUnknownnoreply@blogger.comBlogger229125tag:blogger.com,1999:blog-27581938.post-49528137096663150622021-02-19T13:52:00.002+01:002021-02-19T13:52:24.515+01:00Powershell and UptimerobotUptimerobot can be quite tedious when you need to update many monitors at once. For example say you bought the license for Uptimerobot and now you want to change 50 monitors to check status every 60 seconds instead of the free modes 300 second interval. Luckily Uptimerobot have a great API that we can work with powershell against.getmonitors.ps1 is method to export all monitors to local fileUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-76904911990628196792020-11-27T08:39:00.010+01:002020-11-27T08:39:57.740+01:00Sharepoint 2019 and mysites I had some problems with the old familiar "Working on it" for mysites in Sharepoint 2019. It was difficult to find information about this, Im guessing the installation base for world wide on-premise installations is dropping.Key information when troubleshooting- On User Profile, attribute "Personal Site Capabilities" is set after user visits mysite for the first time. Default behaviour Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-48878044566201108682020-11-02T15:35:00.005+01:002020-11-02T15:40:43.551+01:00Handle multiple versions of powershellPnp with Sharepoint This is a nice way to handle accessing different versions of PNPPowershell. I use this when switching between onpremise environments of different version and online.Note that env-variables can't be used until session, like ISE is restarted. Otherwise can variable be accessed immediatly using [System.Environment]::GetEnvironmentVariable('SharePointPnPPowerShell2019','machine')Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-87319313636680488912020-06-02T14:46:00.003+02:002020-06-02T14:56:20.701+02:00Converting csv to excel
Using the useful powershell module importExcel
I could use this to import folder with csv-files to a excelfil for more easy viewing for common users.
Use commented install-module line for first run.
References:
https://github.com/dfinke/ImportExcel
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-41471133774025356372020-04-21T11:34:00.001+02:002020-04-22T10:40:54.352+02:00Using powershell with UptimeRobots APII got a chance to test Uptimerobots API with Powershell and I used it with a csv-list of urls with keywords to update my uptimerobot account.
Pretty good stuff where you also can output all your monitors with uptimelogs directly to PowerBI or equivalent.
Code:
To get UptimeRobot status from PowerBI the following queries can be used:
Example 1 - Simple query
let
body =
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-16218005431947640172020-04-14T11:39:00.000+02:002020-04-14T11:39:05.761+02:00SelfService sitecollections in Sharepoint 2019With Sharepoint 2019 we now have the ability to allow users to create site collections outside their own mysite themselves. This allows for less administration.
The drawback of this solution is that you can only create managed path sites on primary Alternate Access for webapplication.
Microsofts documentation leaves some holes in regards to how to activate selfservicing functions with Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-46803471019351581942020-01-31T09:40:00.000+01:002020-01-31T09:40:21.807+01:00Blobcache issuesI had some weird problem with images in Sharepoint 2013.Issues were for example
Updated images didn't work, old images still showed for clients.
Change imageproperties didn't work either
Changing website logo didn't work
BlobCache quickly became as suspect, so we tried to flush the blobcache the proper way with flushBlobCache.ps1 but the folders in the blobcache-directory didn't get Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-66455382406204695272020-01-08T12:17:00.001+01:002020-01-08T12:19:49.724+01:00Checking Dotnet version on serverI needed to check running dotnet version on a few servers to verify support for TLS 1.2
I used script below, which I though was easy to update and using hash-tables in an effective way.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-62883867443121255542019-08-30T15:22:00.004+02:002019-08-30T15:24:50.917+02:00Using powershell to check company informationI had a long list of companynames but no homepage adress.
Using the swedish yellow pages service Eniro I could use powershell to get the information.
This script only gets the first result with homepage attribut added, but depending on what you put the results may vary.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-19099041695792579522019-06-18T10:28:00.000+02:002019-06-18T10:28:35.160+02:00Checkup list of websitesTo determine a range of websites dns, registrar and IPOwner and what technology is used the following script can be used.
Note that whois64.exe referred to in script needs to be downloaded seperatly from Sysinternals/Microsoft
References:
https://docs.microsoft.com/en-us/sysinternals/downloads/whois
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-6895076457428710622019-02-07T13:36:00.000+01:002019-02-07T13:36:28.285+01:00enumerate columns from subsitesThis case is something which I've came back to a few times.
Customer wants to output columns from certain content types from a number of sites.
Its always a hassle to get the correct names of columns so I've built a method to output the values more dynamically.
1. First getFields.ps1 reads columns containg values from a list item, outputs to gridview, chosen values gets saved to customfields.csvUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-70693726197143407172018-12-20T09:02:00.000+01:002018-12-20T09:04:11.703+01:00CertAuto For a developer environment I had a few certificates that needed automatic renewal at certain intervals. The script below uses the PSPKI module to check if certificates are expiring on IIS-Site in X days and if so, renews the agains a local certification authority.
The PSPKI -module is really god for sending and approving certification requests via Powershell when Microsofts own tools Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-11332969924240482732018-06-04T09:35:00.002+02:002018-06-04T09:35:38.249+02:00Export IIS bindingsI find the cmdlet for exporting cmdlets a bit lacking so I built my own export function for fun and profit.
The function in the toolsfile collects all info and return a populated object that can be used to export list to file or do something else with.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-40729402283372842262018-05-17T13:12:00.003+02:002018-05-17T13:12:35.309+02:00Digging through a lot of filesI have a scenario where I need to scan a lot of xmlfiles from elmah-logs in the size of 300 000 files.
Powershell was a fun project for this but couldn't really do the job due to performance issues.
When reading 300 000 files using powershell like example below, the script ran for 368 minutes.
I tried running parallell jobs and using dotnet to read files instead but nothing could complete withUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-40622123609483479042018-05-03T11:03:00.000+02:002018-05-04T08:45:29.999+02:00Using hashtables to combine values For a job I needed a good way of combining a primary value with optional subvalues in a xml-file.
Below is an example of how to extract attributes from a xmlelement into a hashtable and then join two hashtables into one. I couldn't find a method for extracting elements on the web, folks usually goes with subnodes instead of attributes. I'm partial to attributes and had to get creative, but the Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-37650585725742334792018-01-12T11:13:00.000+01:002018-01-12T11:13:44.145+01:00Powershell and jobsPowershell jobs are a bit of blunt instrument.Here's two options for sending inputs for them
Scenario 1: Sending a string with all of our values and splitting them to an array when inside the scriptblock.
Scenario2: Sending an object as input. Handy for configs and saves the need to define variablenames.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-38422113595744702542018-01-12T09:23:00.000+01:002018-01-12T09:23:31.254+01:00powershell assisting with mailsExtractAttachedMails.ps1 is used for extracted alla attached mails in a outlook .msg-file to specified folder.CatalogueMails.ps1 is used for indexing the mails to more easily filter on timestamps and senders.
This came in handy when a happy user sent me 45 attached mails with the same subjectline so the extractionprocess also throws in an indexnumber to avoid namingconflicts.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-36951418326792607462017-12-20T07:49:00.000+01:002018-01-12T11:16:22.811+01:00Remove iislogsBuilt a nice script to remove older files from IISLogs.
It has two retentionmodes. Either clear based on number of last changed files or for specific days.
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-31481175874229843132017-11-23T11:49:00.001+01:002017-11-23T11:49:05.691+01:00Installing workflow manager on sharepoint 2016Scenario:
Sharepoint 2016 needs workflow supports since 2010 workflows now seems dead.
This needs to be done offline
Overview of steps
Download all programs from internet-enabled client with getOfflinePackages
Install packages on server in correct order
Configure workflow manager
Register workflow service in sharepoint
Step 1 - Download necessary files for offlineinstallationenUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-77916114210276633162017-11-20T07:08:00.000+01:002017-11-20T07:08:40.831+01:00Sharepoint and alternate languagesSo what happens when a column is created and then changed.
And then, possible, changed again in an alternate language?
First created, staticName is set and the cultured name
When names is changed, only the culturename is changed
When and alternate language is added, and copy of the culturename appears.
When name is changed again to doktor2, only the current language version is changed. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-16692279520333063152017-10-30T09:21:00.000+01:002017-10-30T09:21:10.026+01:00Troubleshooting sharepoint alertsMethod for determining what happens with sharepoint alerts from the serverside.
To determined which server is sending the mail.(Note that this will be different for different webapps, so best is to monitor the whole farm with ULS)run Sysinternals procmon on all servers (usually only the frontends) monitor traffic for :25
Activate verbose logging for alerts
Monitor ULSViewer on specific member Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-89365688761661124852017-10-01T17:49:00.000+02:002017-10-01T17:49:34.201+02:00Openhab2 with telldus tellstick duoThe complete steps to get up and running with a raspberry3, openhab2 and telldus tellstick for managing lights.
Install sdcard with image openhabian using win32 diskimager
Logon raspberry with
openhabian:openhabian using putty
Set new password with passwd
Set static ip
sudo nano /etc/dhcpcd.conf (insert your own ip)interface eth0static ip_address=192.168.0.10/24static Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-14807899534609220742017-09-27T10:25:00.000+02:002017-10-30T09:24:55.643+01:00Patching Sharepoint with the homebrew-methodPatchning Sharepoint is not something to taken lightly.
It's a high risk not to patch but a guaranteed risk to apply the patches.
Last year I had a difficult experience when I patched a semilarge(7 members) farm for the first time with Cumulative Updates.
This had 5 webapplications and +200 databases. And it took some time. Like 30 hours, most of the time being lost when running psconfig on eachUnknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-33513026366754318992017-03-20T07:57:00.001+01:002017-03-20T07:57:02.254+01:00Users break dispformIn this particular case a user decided to throw away the main webpart of the dispform.aspx. This caused all kinds of problems since it was a calenderlist.In this situationen it wasn’t possible to create a new list since a lot of coded things worked with listids. Theres no versioning of dispform.I first tried to use restore to sitedefinitions, but this kind of change didn’t qualify for making Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-27581938.post-3545808067651355002016-07-21T15:56:00.000+02:002017-10-30T10:42:00.503+01:00Script for updating URLrewrite-rulesIn these days urlrewrite might not be the first choice for using but I had a situationen where i needed to be applied.
This offered an oppertunity to create a script to automate the addition of custom rules sets for a specific file.
And I got to fiddle with xml-manipulation which is also fun.
This script reads an csv for inputaddress and ruleTemplate file
csv – addresses.csv
ruleName,target,Unknownnoreply@blogger.com0