Blog >
IT
How to highlight unicode characters in Notepad++
I have text with unicode characters and I want to highlight those characters in Notepad++
This will cause the special characters to be highlighted as symbol codes with their ANSI number. Use the ANSI lookup table to see their related Unicode number. Example text: A m-dash – “smart” quotes |
Azure DNS setup for Office 365
Per-Torben Sørensen wrote an easy to use script for configuring Azure DNS for Office 365. # This script automatically configures Azure DNS for O365 # Written by Per-Torben Sørensen (per-torben.sorensen@advania.no) # # Version: 1.0 #********************************************************************************************* # # Input values below $azureadmin = “me@example.onmicrosoft.com” # admin user in azure portal with DNS rights $ttl = “86400” # TTL for all records (in seconds) $zonename=”azure.contoso.com” $rgname = “testazuredns” # Use Get-AzureRmDnsZone after login to find this $proofvalue = “MS=ms12345678” # Proof of ownership from the Office 365 portal # #********************************************************************************************* # # Variables below $cred = Get-Credential -Message “Log on” -UserName $azureadmin $runscript = $false # Failsafe for accidental running #********************************************************************************************* if ($runscript -eq $false) { Write-Host -ForegroundColor Red “Do NOT run this script non-interactively! Run from editor” return } # Log on Azure RM and set DNS variable Login-AzureRmAccount -Credential $cred $dnszone = Get-AzureRmDnsZone -Name $zonename -ResourceGroupName $rgname # # Creating first TXT record (Proof of domain ownership) New-AzureRmDnsRecordSet -Zone $dnszone -Name “@” -RecordType TXT -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -Value “$($proofvalue)”) # # Create CNAME records New-AzureRmDnsRecordSet -Zone $dnszone -Name “autodiscover” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “autodiscover.outlook.com”) New-AzureRmDnsRecordSet -Zone $dnszone -Name “sip” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “sipdir.online.lync.com”) New-AzureRmDnsRecordSet -Zone $dnszone -Name “lyncdiscover” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “webdir.online.lync.com”) #New-AzureRmDnsRecordSet -Zone $dnszone -Name “msoid” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “clientconfig.microsoftonline-p.net”) New-AzureRmDnsRecordSet -Zone $dnszone -Name “enterpriseregistration” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “enterpriseregistration.windows.net”) New-AzureRmDnsRecordSet -Zone $dnszone -Name “enterpriseenrollment” -RecordType CNAME -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -cname “enterpriseenrollment.manage.microsoft.com”) # # Modifies the existing TXT record $txtrecord = Get-AzureRmDnsRecordSet -Zone $dnszone -Name “@” -RecordType TXT Add-AzureRmDnsRecordConfig -RecordSet $txtrecord -Value “v=spf1 include:spf.protection.outlook.com -all” Set-AzureRmDnsRecordSet -RecordSet $txtrecord # # Create SRV records New-AzureRmDnsRecordSet -Zone $dnszone -Name “_sip._tls” -RecordType SRV -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -Priority 100 -Weight 1 -Port 443 -Target sipdir.online.lync.com) New-AzureRmDnsRecordSet -Zone $dnszone -Name “_sipfederationtls._tcp” -RecordType SRV -Ttl $ttl -DnsRecords (New-AzureRmDnsRecordConfig -Priority 100 -Weight 1 -Port 5061 -Target sipfed.online.lync.com) # # Set MX record – THIS CHANGES THE MAIL FLOW! # $exchadr = ($zonename -replace “\.”,”-“) $exchadr +=”.mail.protection.outlook.com” $mxrecords = @() $mxrecords = New-AzureRmDnsRecordConfig -Exchange $exchadr -Preference 0 New-AzureRmDnsRecordSet -Zone $dnszone -Name “@” -RecordType MX -Ttl $ttl -DnsRecords $mxrecords # # This line allows you to select one or several DNS records and delete them from zone Get-AzureRmDnsRecordSet -Zone $dnszone | Out-GridView -Title “Select record to delete” -OutputMode Multiple | Remove-AzureRmDnsRecordSet # |
Disable Windows 10 focus stealing
Windows has this annoying habit of letting apps become the foreground app when they are started, this goes against my usage where I start an app and then continue in another app while waiting for it to load. I do not want an app ever to become the foreground app when it just started. If this is a problem for you too, please sign the petition: Here is a possible solution: In Regedit change HKEY_CURRENT_USER\Control Panel\Desktop\ForegroundLockTimeout from 0 to 30d40 Restart Windows. Reference: https://www.reddit.com/r/Windows10/comments/3vbzth/turn_off_focus_stealing/ |
Powershell Rename File with TimeStamp
This script takes a file and renames it to include the last write time stamp in the file name. if (Test-Path $LogFile) { $LogFileTimestamp = ([datetime](Get-ItemProperty -Path $LogFile -Name lastwritetime).lastwritetime).ToString("yyyyMMddTHH.mm.sszz") $LogBackupfile = $LogFile.Replace(".", "_$LogFileTimestamp.") Rename-Item $LogFile $LogBackupfile } |
SQL map time to .Net ticks
Windows update force reboot
Windows sometimes restart even when there is a user logged in. This can be remedied with the following registry edits. The attached file contains these edits. [HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU] "UseWUServer"=dword:00000001 "NoAutoUpdate"=dword:00000000 "AUOptions"=dword:00000005 "AutoInstallMinorUpdates"=dword:00000001 "IncludeRecommendedUpdates"=dword:00000001 "NoAutoRebootWithLoggedOnUsers"=dword:00000001 "RebootWarningTimeoutEnabled"=dword:00000000 "RebootWarningTimeout"=dword:00000090 "RebootRelaunchTimeoutEnabled"=dword:00000001 "RebootRelaunchTimeout"=dword:000005A0 "ScheduledInstallDay"=dword:00000000 "ScheduledInstallTime"=dword:00000001 References |
PowerShell Find the Current Path
Powershell create new self signed certificate
The command to create a new self signed certificate is as follows: New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname customer1-test.cloudapp.net From: http://windowsitpro.com/blog/creating-self-signed-certificates-powershell |
PowerShell Export SSL certificates
Get incremental build number in TFS VisualStudio online
I wanted incremental build numbers from VisualStudio online when automatically building and deploying to Google play store. The build process file creates the buildnumber in the first line: this:Process.BuildNumberFormat="["$(Rev:rr)"]" The $(Rev:xxx) defines the build number. When a build is completed, if nothing else in the build number has changed, the Rev integer value is incremented by one. Although I could not find any documentation, it seems the Rev number has the following format: rr formats it like ## so: $(Rev:.r) is formatted as .1 $(Rev:.rr) is formatted as .01 $(Rev:rr) is formatted as 01 References: |
1-10 of 37