Posts

Powershell script - Rename computer and join domain

I had to automate the process. I used the following script: $hostname = read-host 'hostname' $Domain = 'domain.com' $Credential = Get-Credential Rename-Computer $hostname Add-Computer -Domain $Domain -NewName $hostname -Credential $Credential -Restart -Force if you also need to setup ip: $ipaddress = read-host 'enter new ip' $gateway = read-host 'gateway:' $prefix = read-host 'prefix (ie 24):' $dns1 = read-host 'dns 1' $dns2 = read-host 'dns 2' New-NetIPAddress –IPAddress $ipaddress -DefaultGateway $gateway -PrefixLength $prefix -InterfaceIndex (Get-NetAdapter).InterfaceIndex Set-DnsClientServerAddress -InterfaceIndex (Get-NetAdapter).InterfaceIndex -ServerAddresses ($dns1, $dns2) $hostname = read-host 'hostname' $Domain = read-host 'domain' $Credential = Get-Credential Rename-Computer $hostname Add-Computer -Domain $Domain -NewName $hostname -Credential $Credential -Restart -Force

Blazor Tutorial - How to create a modal component

Image
Blazor modal tutorial The following example illustrates how you can create a modal component in Blazor server. For the following example i have used mdbootstrap which can be found here www.mdboostrap.com The goal is to create a modal that is easy to use and which can be used as a template across your site.

Guide to codefragments on blogger

Image
To create code fragments/snippets, do the following: Make sure highlightjs has been installed : https://github.com/highlightjs/highlight.js When writing the blog. Add a reference tag like <CODEGOESHERE> and make it code in blogger, like so: <INSERT HERE> The tag can now be found in the html part, add <code> </code> before and after <INSERT HERE>. So the result is like this: <INSERT HERE> Go back to blogger text editor and replace <INSERT HERE> with the actual code. Here i did a c# example: private void CallParentApplyMethod() { if (Parent.Apply()) { Close(); } } you are done.

Unregister Background tasks with powershell - Oneliners

Unregister Background tasks with powershell - One liner     If you want to get all backgroundtasks for UWP apps. You can use this to find the entrypoint: get-appbackgroundtask Now, you can decide to unregister each with the following command:  unregister-appbackgroundtask -taskid However, if you want a oneliner to do it for you: get-appbackgroundtask | where -Property entrypoint -like "INSERTNAMEOFAPP*" |select taskid | foreach {unregister-appbackgroundtask -taskid $_.EntryPoint} 

C# - How to create - WPF Windows 10 Toast

Image
I experiened a lot of touble creating toast for windows 10 while doing a simple desktop application in wpf. After a while i found a viable solution, which is why iam posting it. Heres an working example: https://code.msdn.microsoft.com/windowsdesktop/Sending-toast-notifications-71e230a2 Do it yourself:

Uninstall SQL Management Studio

Image
Microsoft released a new version of Microsoft SQL Management Studio SMSS. it can be downloaded from here: https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms This article, i will show, how to uninstall SQL Management Studio. HOW TO:

[SOLVED] Extend Microsoft SQL Server Trial / Evaluation period

Image
Restart SQL service after trial period - and continue using it The problem usually occurs when you are running an evaluation instance of SQL Server and the evaluation time period has expired. I will show you a workaround, that enables you to continue using SQL even though it has expired.

[SOLVED] Veeam: Failed change tracking (CBT)

Image
Failed to flush change tracking data, using full scan to determine changes. Failed to create change tracking time stamp for virtual disk file I've encountered the above, after i added some new CSV to a cluster. The backup jobs have been running fine for ages before this. As per say, this is not really a critical issue, since the backups just takes longer. Needless to say, i wanted it to function. I tried: Reboot Nodes, Hosts, VMs Fully update Stop VeeamFCT service and Start it again Update hyper-v integration service Delete previous backups Run full backups Read Veeam forums Running Reset-HvVmChangeTracking Din't work. However!

Popular posts from this blog

[SOLVED] Veeam: Failed change tracking (CBT)

Fixing Error 25541. Failed to open XML file