Check Email Addresses Listed in Active Directory

PowerShell - @SeniorDBA

One of the tasks that administrators often need to perform is to verify that each active directory user account has a valid email address. This is important for ensuring that users can receive notifications, access online services, and communicate with other users. There are different ways to verify the email addresses of active directory users, but in this article, we will focus on one method that uses PowerShell.

PowerShell is a scripting language that allows administrators to automate tasks and manage systems. PowerShell can interact with active directory through the ActiveDirectory module, which provides cmdlets for querying and modifying objects in the directory. To use PowerShell to verify the email addresses of active directory users, we need to follow these steps:

Continue reading “Check Email Addresses Listed in Active Directory”

TIOBE Index for May 2023 – Which Programming Language is Most Popular?

Programming - @SeniorDBA

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third-party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

It has been stated before, programming language popularity is rather stable. If we look at the first 10 programming languages in the TIOBE index, then C# is the youngest of them all. C# started in 2000. That is 23 years ago! Almost every day a new programming language is born, but hardly any of them enter the top 100. At least not in their first 10 years. The only languages younger than 10 years in the current top 100 are: Swift (#14), Rust (#17), Crystal (#48), Solidity (#59), Pony (#71), Raku (#72), Zig (#88) and Hack (#92). None of them are less than 5 years old. In other words, it is almost impossible to hit the charts as a newbie. On the contrary, we see that golden oldies revive. Take for instance Fortran, which is back in the top 20 thanks to the growing demand for numerical computational power. So, if you have just invented a brand new language, please have some patience! — Paul Jansen CEO TIOBE Software

You can read the details of how and why languages are popular at the TIOBE website. If you are a developer, you will find this information interesting.

Continue reading “TIOBE Index for May 2023 – Which Programming Language is Most Popular?”

TIOBE Index for January 2023 – Which Language is Most Popular?

Programming - @SeniorDBA

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third-party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Scripting language Lua is back in the top 20 of the TIOBE index. In its heyday in 2011, Lua briefly touched a top 10 position. Whether this is going to happen again is unknown. But it is clear that Lua is catching up in the game development market: easy to learn, fast to execute, and simple to interface with C. This makes Lua a perfect candidate for this job. One of the drivers behind the recent success of Lua is the very popular gaming platform Roblox, which uses Lua as its main programming language. –Paul Jansen CEO TIOBE Software

TIOBE also announced that C++ is the programming language of 2022. You can read the details of how and why at the TIOBE website, as well as see the runners up (C and Python). If you are a developer, you will find this information interesting.

Continue reading “TIOBE Index for January 2023 – Which Language is Most Popular?”

TIOBE Index for March 2022 – Which Language is Most Popular?

Programming - @SeniorDBA

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third-party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Scripting language Lua is back in the top 20 of the TIOBE index. In its heyday in 2011, Lua briefly touched a top 10 position. Whether this is going to happen again is unknown. But it is clear that Lua is catching up in the game development market: easy to learn, fast to execute, and simple to interface with C. This makes Lua a perfect candidate for this job. One of the drivers behind the recent success of Lua is the very popular gaming platform Roblox, which uses Lua as its main programming language. –Paul Jansen CEO TIOBE Software

You’ll also notice Python has moved to the top, and Java has lost some popularity and is down to 3th.

Continue reading “TIOBE Index for March 2022 – Which Language is Most Popular?”

TIOBE Index for January 2022 – Which Language is Most Popular?

Programming - @SeniorDBA

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third-party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Python started at position #3 of the TIOBE index at the beginning of 2021 and left both Java and C behind to become the number one of the TIOBE index. But Python’s popularity didn’t stop there. It is currently more than 1 percent ahead of the rest. Java’s all-time record of 26.49% ratings in 2001 is still far away, but Python has it all to become the de facto standard programming language for many domains. There are no signs that Python’s triumphal march will stop soon.– Paul Jansen CEO TIOBE Software

Continue reading “TIOBE Index for January 2022 – Which Language is Most Popular?”

TIOBE Index for November 2021

Programming - @SeniorDBA

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third-party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Since the start of the TIOBE index, more than 20 years ago, PHP has been a permanent top 10 player. Recently, we saw PHP struggling to stay in that top 10. PHP was once the master of web programming, but now it is facing a lot of competition in this field. This is not to say that PHP is dead. There are still a lot of small and medium enterprises relying on PHP. So I expect PHP to decline further but in a very slow pace. Two of PHP’s competitors, Ruby and Groovy, gain both 3 positions this month. Ruby from #16 to #13 and Groovy from #15 to #12. Other interesting moves this month are Lua (from #32 to #26), Dart (from #40 to #31), and Kotlin (from #38 to #33). — Paul Jansen CEO TIOBE Software

Continue reading “TIOBE Index for November 2021”

Application Logging Best Practices

As an application developer, you need to think about how your application logs events. Logging is a traditional and essential tool that assists in monitoring certain activities conducted by your application, as well as what the users of your application. By creating a a centralized logging service that can be used by your application, you can log all required activity so that debugging can be a less painful process.

These are some of the Best Practices for logging:

  1. Human Readable – While you may be tempted to create a log of event and errors that can easily processed by a feature inside your application, or even by another custom utility, it won’t always be possible or practical to rely on technology to parse through your logs. Unless you have been writing logs for many years, stick to the simple and make your logs human readable.
  2. Use Timestamps – Add the current system date and time to each logged event. This gives you invaluable information of the sequence of events, how log each event lasted, etc.
  3. Use Text Format – In the beginning, log everything to a text file. You might be tempted to log everything to a database table, or save the values in XML, but those all require more effort and can make troubleshooting the log writing process harder, so keep it simple. Later you can look at Windows Event logs or other methods.
  4. Log Everything – It is easy to assume you just want to log errors, but you probably want to log everything in the beginning. I usually create levels of logging, and allow the user or administrator to set the level of logging unique to that instance. The default might be minimal logging, and you allow the user to elevate the logging to verbose logging if they suspect an issue.  Or you could default to verbose logging until the program has reached a more stable version so that logging can be reduced down to minimal.
  5. Single Line – If possible, log the entire event as one line. That won’t always be possible, but it should be your goal to maintain readability.
  6. Keep it Local – Create and maintain your log files on the local system. How can you log a network issue if you can’t reach the log file on a network server?
  7. Rotate Files – If you program is running over a long enough period, your log files can get very large. If you are writing verbose logs, and you program writes 1 MB of data per day, after one year you might have a 200-365 MB log file. After 5 years you could have a 1 GB log file. Files that large offer very little assistance if you really need to read through them for an actual troubleshooting event. You should decide how long the information is valuable, and either overwrite older events or create a new log file. It is much better to sort through several smaller files to locate the correct file to read than one massive file.

Continue reading “Application Logging Best Practices”

History of PowerShell

PowerShell is a tool developed by Microsoft to provide a powerful command-line interface to allow users to perform various automation efforts. If you are aware of Linux and mac command line, the PowerShell command-line is very similar in purpose. PowerShell version 1.o was first released in 2006 to support Windows XP SP2, Windows Server 2003 SPI, and Windows Vista. The newest version is PowerShell 7, which is the replacement for PowerShell Core 6.x products as well as Windows PowerShell 5.1, which is the previous supported Windows PowerShell version.

Development

Every version of Microsoft Windows has included a command line utility for basic scripting operations to help manage the Operating System, basically an interface similar to the older MS-DOS interface. The user would create a batch file that included basic scripting language commands which could be used to automate various tasks. The automation abilities of this older interface was limited in scope and didn’t allow full automation of all Windows administrative operations. Microsoft addressed these concerns by the introduction of the Windows Script Host in 1998 with Windows 98, and its command-line based host named cscript.exe. The problem was the Windows Script Host still had limited abilities and was quickly seen by many as more helpful to hackers than to administrators.

By 2002, Microsoft was developing a new command-line management tool called Monad. Jeffrey Snover published a white paper in August 2002, called the “Monad Manifesto”, and this paper discussed the concept of translating Unix tools to the Windows platform. Since Windows is very different from Unix, this is much harder than it might seem.

Monad was first demonstrated at the Professional Development Conference (PDC) in 2003, later it was released to private beta, and was eventually published to public beta in June 2005. By April 2006, Microsoft had announced the initial Monad product had been renamed Windows PowerShell.

PowerShell v2.0 development began before PowerShell v1.0 was shipped. 

Initial Release

Release Candidate 2 of PowerShell version 1 was released in September 2006, with the formal release in November 2006 in Barcelona. PowerShell for earlier versions of Windows was released in January 2007. PowerShell v2.0 was completed and released to manufacturing in August 2009,and it was part of Windows 7 and Windows Server 2008 R2. 

Release History

Windows PowerShell 1.0

PowerShell 1.0 was released in November 2006 for Windows XP SP2, Windows Server 2003 SP1 and Windows Vista. It is an optional component of Windows Server 2008.

Windows PowerShell 2.0

Windows PowerShell ISE v2.0 was released on Windows 7, and it was an integrated development environment for PowerShell scripts. The most remarkable feature introduced, with the help of WS-management, allowed you to write your commands to a remote machine.

PowerShell 2.0 is integrated with Windows 7 and Windows Server 2008 R2 and is released for Windows XP with Service Pack 3, Windows Server 2003 with Service Pack 2, and Windows Vista with Service Pack 1.

PowerShell v2 includes changes to the scripting language and hosting API, in addition to including more than 240 new cmdlets.

New features of PowerShell 2.0 include:

  • PowerShell remoting: Using WS-Management, PowerShell 2.0 allows scripts and cmdlets to be invoked on a remote machine or a large set of remote machines.
  • Background jobs: Also called a PSJob, it allows a command sequence (script) or pipeline to be invoked asynchronously. Jobs can be run on the local machine or on multiple remote machines. An interactive cmdlet in a PSJob blocks the execution of the job until user input is provided.
  • Transactions: Enable cmdlet and developers can perform transactional operations. PowerShell 2.0 includes transaction cmdlets for starting, committing, and rolling back a PSTransaction as well as features to manage and direct the transaction to the participating cmdlet and provider operations. The PowerShell Registry provider supports transactions.
  • Advanced functions: These are cmdlets written using the PowerShell scripting language. Initially called “script cmdlets”, this feature was later renamed “advanced functions”.
  • Modules: This allows script developers and administrators to organize and partition PowerShell scripts in self-contained, reusable units. Code from a module executes in its own self-contained context and does not affect the state outside the module. Modules can define a restricted runspace environment by using a script. They have a persistent state as well as public and private members.
  • Script debugging: It allows breakpoints to be set in a PowerShell script or function. Breakpoints can be set on lines, line & columns, commands and read or write access of variables. It includes a set of cmdlets to control the breakpoints via script.
  • You can get more information about PowerShell v2 here.
  • Microsoft recommends you no longer support, install, or use PowerShell v2

Windows PowerShell 3.0

PowerShell 3.0 is integrated with Windows 8 and with Windows Server 2012. Microsoft has also made PowerShell 3.0 available for Windows 7 with Service Pack 1, for Windows Server 2008 with Service Pack 1, and for Windows Server 2008 R2 with Service Pack 1.

PowerShell 3.0 is part of a larger package, Windows Management Framework 3.0 (WMF3), which also contains the WinRM service to support remoting. Microsoft made several Community Technology Preview releases of WMF3. An early community technology preview 2 (CTP 2) version of Windows Management Framework 3.0 was released on 2 December 2011. Windows Management Framework 3.0 was released for general availability in December 2012 and is included with Windows 8 and Windows Server 2012 by default.

New features in PowerShell 3.0 include:

  • Scheduled jobs: Jobs can be scheduled to run on a preset time and date using the Windows Task Scheduler infrastructure.
  • Session connectivity: Sessions can be disconnected and reconnected. Remote sessions have become more tolerant of temporary network failures.
  • Improved code writing: Code completion (IntelliSense) and snippets are added. PowerShell ISE allows users to use dialog boxes to fill in parameters for PowerShell cmdlets.
  • Delegation support: Administrative tasks can be delegated to users who do not have permissions for that type of task, without granting them perpetual additional permissions.
  • Help update: Help documentations can be updated via Update-Help command.
  • Automatic module detection: Modules are loaded implicitly whenever a command from that module is invoked. Code completion works for unloaded modules as well.
  • You can get more information about PowerShell v3 here.

Windows PowerShell 4.0

PowerShell 4.0 is integrated with Windows 8.1 and with Windows Server 2012 R2. Microsoft has also made PowerShell 4.0 available for Windows 7 SP1, Windows Server 2008 R2 SP1, and Windows Server 2012.

New features in PowerShell 4.0 include:

  • Desired State Configuration: Declarative language extensions and tools that enable the deployment and management of configuration data for systems using the DMTF management standards and WS-Management Protocol
  • New default execution policy: On Windows Servers, the default execution policy is now RemoteSigned.
  • Save-Help: Help can now be saved for modules that are installed on remote computers.
  • Enhanced debugging: The debugger now supports debugging workflows, remote script execution and preserving debugging sessions across PowerShell session reconnections.
  • -PipelineVariable switch: A new ubiquitous parameter to expose the current pipeline object as a variable for programming purposes
  • Network diagnostics to manage physical and Hyper-V’s virtualized network switches
  • Where and ForEach method syntax provides an alternate method of filtering and iterating over objects.
  • You can get more information about PowerShell v4 here.

Windows PowerShell 5.0

Windows Management Framework (WMF) 5.0 RTM which includes PowerShell 5.0 was re-released to web on 24 February 2016, following an initial release with a severe bug.

Key features included:

  • The new class keyword that creates classes for object-oriented programming.
  • The new enum keyword that creates enums.
  • Extending support for switch management to layer 2 network switches.
  • Debugging for PowerShell background jobs and instances of PowerShell hosted in other processes (each of which is called a “runspace”)
  • Desired State Configuration (DSC) Local Configuration Manager (LCM) version 2.0
  • DSC partial configurations
  • DSC Local Configuration Manager meta-configurations
  • Authoring of DSC resources using PowerShell classes
  • You can get more information about PowerShell v5 here.

Windows PowerShell 5.1

It was released along with the Windows 10 Anniversary Update in August 2016, and in Windows Server 2016. PackageManagement now supports proxies, PSReadLine now has ViMode support, and two new cmdlets were added: Get-TimeZone and Set-TimeZone. The LocalAccounts module allows for adding/removing local user accounts. A preview for PowerShell 5.1 was released for Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, and Windows Server 2012 R2 in July 2016, and was formally released in January 2017.

PowerShell 5.1 is the first version to come in two editions of “Desktop” and “Core”. The “Desktop” edition is the continuation of the traditional Windows PowerShell that runs on full .NET Framework stack. The “Core” edition runs on .NET Core and is bundled with Windows Server 2016 Nano Server. In exchange for smaller footprint, the “Core” version lacks some features such as the cmdlets to manage clipboard or join a computer to a domain, WMI version 1 cmdlets, Event Log cmdlets, and profiles. This was the final version of PowerShell made exclusively for Windows.

PowerShell Core 6

PowerShell Core 6.0 was first announced in August 2016, when Microsoft unveiled PowerShell Core and also announced the decision to make the product cross-platform, independent of Windows, free, and open source. It achieved general availability in January 2018 for Windows, macOS, and Linux. It has its own support lifecycle and adheres to the Microsoft lifecycle policy that is introduced with Windows 10: Only the latest version of PowerShell Core is formally supported. Microsoft expects to release one minor version for PowerShell Core 6.0 every six months.

The most significant change in this version of PowerShell is the expansion to the other platforms. For Windows administrators, this version of PowerShell did not include any major new features. In an interview with the community in January 2018, the PowerShell team was asked to list the top 10 most exciting things that would happen for a Windows IT professional who would migrate from Windows PowerShell 5.1 to PowerShell Core 6.0; in response, Angel Calvo of Microsoft could only name two: cross-platform and open-source.

According to Microsoft, one of the new features of PowerShell 6.1 is “Compatibility with 1900+ existing cmdlets in Windows 10 and Windows Server 2019.” Still, no details of these cmdlets can be found in the full version of the change log. Microsoft later professes that this number was insufficient as PowerShell Core failed to replace Windows PowerShell 5.1 and gain traction on Windows. It was, however, popular on Linux.

PowerShell Core 6.2 is focused primarily on performance improvements, bug fixes, and smaller cmdlet and language enhancements that improved developer productivity.

PowerShell 7

PowerShell 7 is the replacement for PowerShell Core 6.x products as well as Windows PowerShell 5.1, which was the last supported Windows PowerShell version. The focus in development was to make PowerShell 7 a viable replacement for Windows PowerShell 5.1, i.e. to have near parity with Windows PowerShell in terms of compatibility with modules that ship with Windows.

New features in PowerShell 7 include:

  • Near parity with Windows PowerShell in terms of compatibility with built-in Windows modules
  • A new error view
  • The Get-Error cmdlet
  • Pipeline chaining operators that allow conditional execution of the next cmdlet in the pipeline
  • You can get more information about PowerShell v7 here.

Use of PowerShell

PowerShell is a fully supported scripting language that is actively under development by Microsoft and it also has a strong user community. PowerShell is a modern command shell that includes the same features as other popular shells. PowerShell accepts and returns .NET objects, which makes it a very powerful tool. The shell includes the following features:

  • Robust command-line history
  • Tab completion and command prediction
  • Supports command and parameter aliases
  • Pipeline for chaining commands
  • In-console help system
  • Extensible through functions, classes, scripts, and modules
  • Extensible formatting system for easy output
  • Extensible type system for creating dynamic types
  • Built-in support for common data formats like CSV, JSON, and XML

There are multiple sources to help you get started with PowerShell. Starting PowerShell in Windows is really easy.

Resources

Wikipedia – PowerShell

Microsoft – PowerShell

TIOBE Index for April 2021

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Objective-C’s fame came to a sudden stop when, in 2014, Apple announced that there was a new language called Swift that should replace Objective-C. Remarkably, it took a long time before Swift was more popular than Objective-C. Only 7 years after its death sentence, Objective-C is now leaving the top 20. But there is still hope for Objective-C because old languages sometimes strike back. Take a look at Fortran! This dinosaur is back in the top 20 after more than 10 years. Fortran was the first commercial programming language ever, and is gaining popularity thanks to the massive need for (scientific) number crunching. Welcome back Fortran.

Continue reading “TIOBE Index for April 2021”

TIOBE Index for January 2021

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

C is still number one, but it is Python that claims the second position now. Some say that Python’s recent surge in popularity is due to booming fields such as data mining, AI and numerical computing. 

Continue reading “TIOBE Index for January 2021”

TIOBE Index for December 2020

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

C is still number one, but it is Python that claims the second position now. Some say that Python’s recent surge in popularity is due to booming fields such as data mining, AI and numerical computing. 

Continue reading “TIOBE Index for December 2020”

TIOBE Index for November 2020

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

C is still number one, but it is Python that claims the second position now. Some say that Python’s recent surge in popularity is due to booming fields such as data mining, AI and numerical computing. 

Continue reading “TIOBE Index for November 2020”

TIOBE Index for October 2020

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Programming languages used for teaching children to program have made significant movement towards the top 20 of the language lists, but this is expected in light of our current work-from-home environment. Another change is from now on “Visual Basic .NET” is called “Visual Basic” and the old entry “Visual Basic” is renamed to “Classic Visual Basic”.

Continue reading “TIOBE Index for October 2020”

ASP.NET Core logging with NLog and SQL Server

NLog is a free logging platform for .NET, Xamarin, Silverlight and Windows Phone with rich log routing and management capabilities. NLog makes it easy to produce and manage high-quality logs for your application regardless of its size or complexity. NLog can dynamically write to one of multiple targets for each log message, including text files, Event Logs, email, and SQL Server.

In this article by Damien Bod shows how to use NLog to write your log events to SQL Server.

The NLog.Extensions.Logging is required to add NLog to a ASP.NET Core application. This package as well as the System.Data.SqlClient are added to the dependencies in the project.json file.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"dependencies": {
       "Microsoft.NETCore.App": {
           "version": "1.0.0",
           "type": "platform"
       },
       "Microsoft.AspNetCore.Mvc": "1.0.0",
       "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
       "Microsoft.AspNetCore.Diagnostics": "1.0.0",
       "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
       "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0",
       "Microsoft.Extensions.Configuration.FileExtensions": "1.0.0",
       "Microsoft.Extensions.Configuration.Json": "1.0.0",
       "Microsoft.Extensions.Logging": "1.0.0",
       "Microsoft.Extensions.Logging.Console": "1.0.0",
       "Microsoft.Extensions.Logging.Debug": "1.0.0",
       "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0",
       "NLog.Extensions.Logging": "1.0.0-rtm-alpha4",
       "System.Data.SqlClient": "4.1.0"
 },

Continue reading “ASP.NET Core logging with NLog and SQL Server”

TIOBE Index for April 2020

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Programming languages used for teaching children to program have made significant movement towards the top 20 of the language lists, but this is expected in light of our current work-from-home environment. Another chnage is from now on “Visual Basic .NET” is called “Visual Basic” and the old entry “Visual Basic” is renamed to “Classic Visual Basic”.

Continue reading “TIOBE Index for April 2020”

TIOBE Index for August 2019

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Programming language Python is is now in the top 3 of the TIOBE index. Since Python surpassed C++ and became number 3, it has achieved an all time high for the scripting language of Guido van Rossum. Nothing much has changed recently in the TIOBE index. In the top 10 only Objective-C and Python have made any significant gains. 

Continue reading “TIOBE Index for August 2019”

May PowerShell: Log PowerShell Events

PowerShell - @SeniorDBA

Note: For the month of May 2019, I’m focusing on PowerShell information that could help you better utilize this powerful scripting tool in your environment.

On a system that you feel is at risk of malicious PowerShell attack, you should take advantige of the built-in PowerShell logging to track potential unauthorized PowerShell script execution. It may not be possible on all endpoints, but there are many opportunties to track PowerShell use.

Module Logging

Module logging records pipeline execution details as PowerShell executes, including variable initialization and command invocations. Module logging will record portions of scripts, some de-obfuscated code, and some data formatted for output. This logging will capture some details missed by other PowerShell logging sources, though it may not reliably capture the commands executed. Module logging has been available since PowerShell 3.0. Module logging events are written to Event ID (EID) 4103.

Continue reading “May PowerShell: Log PowerShell Events”

May PowerShell: Remove PowerShell V.2

PowerShell - @SeniorDBA

Note: For the month of May 2019, I’m focusing on PowerShell information that could help you better utilize this powerful scripting tool in your environment.

Microsoft recommends you no longer use PowerShell V.2 for security reasons, but it is probably installed on your computers.

Microsoft has done a great job of recently adding powerful new security features in PowerShell. It is also obvious that the security features integrated in the latest versions of PowerShell do not apply to the older versions of PowerShell, which makes its use by malicious attackers to target PowerShell v.2 a risk to your computers. The older version of PowerShell does not have native logging capabilities, it remains undetected, and offers stealth in malicious operations so it is often used for lateral movement and persistence techniques.

For these reasons Microsoft decided that PowerShell v.2 is deprecated from the more recent versions of Windows, so it is also highly recommend to check and remove PowerShell v.2 from your environment.

You can check whether Windows PowerShell 2.0 is installed by running the following (as an administrator). Continue reading “May PowerShell: Remove PowerShell V.2”

May PowerShell: Auditing Office 365 using PowerShell and Hawk

PowerShell - @SeniorDBA

Note: For the month of May 2019, I’m focusing on PowerShell information that could help you better utilize this powerful scripting tool in your environment.

Hawk is a Powershell based tool for gathering information related to O365 intrusions and potential Breaches. You can simply use the Hawk Powershell Script that makes use of Exchange Online and Azure powershell scripts to generate the auditing reports you may need when investigating a suspected breach.

Reports Include:

  • CAS Mailbox Info
  • Azure Audit Logs (writes AzureActiveDirectoryAccountLogon: User login events with IP addresses)
  • Mailbox Audit Report (Mailbox login report with delegate and admin actions)
  • User Mailbox Forwarding Information
  • User Inbox Rules Information
  • Mailbox Info
  • Mailbox Statistics
  • Azure Authentication logs report (All authentication activity for the user in RAW + Readable form)

Azure AD reports rely on AAD P1 and P2 licenses, make sure you have the required licenses assigned.

GitHub Repository: https://github.com/Canthv0/hawk

A good starting place is the “Start-HawkTenantInvestigation”, this will run all the tenant based cmdlets and provide a collection of data to start with. Once this data has been reviewed if there are specific user(s) that more information should be gathered on “Start-HawkUserInvestigation”, which will gather all the User specific information for a specific user.

Visual Studio 2019 Roadmap

Visual Studio - @SeniorDBA

Microsoft has released their planning calendar for future versions Visual Studio. In this newly released roadmap, Microsoft detailed some of the features that will be coming to the IDE in Q1 of 2019.

As requested by the user community, there is improved Xamarin.Forms support in Visual Studio 2019, it will also be multi-monitor dots per inch aware (which should help improve clarity on monitors with different DPIs and resolutions), and some services will also be moved to the background to improve load times.

Continue reading “Visual Studio 2019 Roadmap”

How Microsoft made C# Open Source

Open Source - @SeniorDBA

The powerful C# general-purpose object-oriented programming language was developed by Microsoft (Anders Hejlsberg) as part of its .NET initiative in 2000. The most recent version of C# is 7.3, which was released in 2018 as part of Visual Studio 2017.

Microsoft decided to continue the development of new language features using the open source model, so they completely re-wrote the language in C# and published the source code on GitHub.

Continue reading “How Microsoft made C# Open Source”

A Quick Introduction to Scrum Methodology

Scrum - @SeniorDBA

Agile is a development method designed to add energy, focus, clarity and transparency to the project planning and implementation process. Scrum is probably the most widely used Agile framework for developing and managing complex projects. Scrum is used to successfully manage projects in which there is usually uncertainty and ambiguity at the early stages of the project, and the methods used help organize efforts to complete small pieces of an overall project as they are defined.

The entire project is split into a sequence of smaller iterations called Sprints. Each Sprint is time-boxed for less than one month (usually 2 weeks) and planned well in advance. Planning is completed not according to a set of prescribed tools, but according to the requirements as decided by the Scrum team. A self-organizing and cross-functional team identifies tasks and organizes team efforts to accomplish a well defined set of tasks in small 2-4 week increments of time. In order to achieve maximum cooperation among all team members, daily face-to-face communication is encouraged. The business stakeholders and the technical team assigned to the Sprint work in close collaboration to deliver of high-quality, working software at the end of each Sprint.

Continue reading “A Quick Introduction to Scrum Methodology”

Julia Programming Language

Julia - @SeniorDBA

After years of working on the details, the dynamic programming language Julia 1.0 was officially released to the public during JuliaCon, an annual conference of Julia users held recently in London.

Julia 1.0 is a huge Julia milestone since MIT Professor Alan Edelman, Jeff Bezanson, Stefan Karpinski, and Viral Shah released Julia to developers in 2012.

Julia is free and open source language that was developed and incubated at MIT with more than 700 active open source contributors, 1,900 registered packages, 41,000 GitHub stars, 2 million downloads, and a reported 101 percent annual rate of download growth. It is used at more than 700 universities and research institutions and by companies such as Aviva, BlackRock, Capital One, and Netflix.

Continue reading “Julia Programming Language”

TIOBE Index for August 2018

Have you seen the latest TIOBE rankings report?

The TIOBE Programming Community index is an indicator of the popularity of programming languages. The index is updated once a month. The ratings are based on the number of skilled engineers world-wide, courses and third party vendors. Popular search engines such as Google, Bing, Yahoo!, Wikipedia, Amazon, YouTube and Baidu are used to calculate the ratings. Observe that the TIOBE index is not about the best programming language or the language in which most lines of code have been written.

Programming language Python is getting very close to the top 3 of the TIOBE index. If Python surpasses C++ and becomes number 3, this will be an all time high for the scripting language of Guido van Rossum. In 2005 there was a study what programming language was taught most at US universities and Java appeared to be a clear number one with 60% of all introductory programming courses. Similar research was conducted almost 10 years later in 2014 and the outcome was different. This time Python was a clear winner with more than 70% “market share”.

Continue reading “TIOBE Index for August 2018”

SQL Server: List table columns names instead of using SELECT *

Smart and Easy - @SeniorDBA

In SQL Server, and in any common SQL language, the asterisk ( * ) tells the database engine to return all columns within a table. Using “SELECT *” in your queries is a bad idea, and the reasons why we don’t recommend this is:

    • Security – If an unauthorized user gets access to your query and it returns * (meaning all columns)  it could leave every column available for misuse.
    • Performance – It should always be faster to return the data just the columns you need than for all available columns. When using “SELECT *” the column list is resolved each time you run the statement, so it is almost always true that it is faster to return just the columns you need instead of all columns.
    • Confusion – As things change over time, you really can’t be sure that a query written today using “SELECT *” will return results easily digestible by the program or report that must consume the data in the future. Columns may be added or removed to a table over time, and if you specify columns in your SELECT queries you know exactly which ones will be returned.

We know the reason must people use “SELECT *” in a query is because it is easy and fast. So how can we make using the column names easy and fast?There are a few examples that make it extremely easy to list the column names from a table.

Continue reading “SQL Server: List table columns names instead of using SELECT *”