Pull to refresh
12.83

PowerShell *

Task automation and configuration management framework

Show first
Rating limit
Level of difficulty

MSSQL: Table Rebuild and Reorg in highload 24/7 Environments

Level of difficulty Medium
Reading time 14 min
Views 1.7K

How do you deal with index fragmentation if your SQL server is working in high load environment with 24/7 workload without any maintenance window? What are the best practices for index rebuild and index reorganize? What is better? What is possible if you have only Standard Edition on some servers? But first, let's debunk few myths.

Myth 1. We use SSD (or super duper storage), so we should not care about the fragmentation. False. Index rebuild compactifies a table, with compression it makes it sometimes several times smaller, improving the cache hits ratio and overall performance (this happens even without compression).

Myth 2. Index rebuild shorten SSD lifespan. False. One extra write cycle is nothing for the modern SSDs. If your tempdb is on SSD/NVMe, it is under much harder stress than data disks.

Myth 3. On Enterprise Edition there is a good option: ONLINE=ON, so I just create a script with all tables and go ahead. False. There are tons of potential problems created by INDEX REBUILD even with ONLINE and RESUMABLE ON - so never run index rebuilds without controlling the process.

Finally, we will tackle the REBUILD vs REORGANIZE subject and what is possible to achieve if you have only Standard Edition.

Read more
Total votes 3: ↑3 and ↓0 +3
Comments 0

Powershell way to exclude folder from Defender list

Reading time 2 min
Views 3.4K
To exclude some folder from the defender list can be used cmdlet Set-MpPreference
Manly, now you can stop reading, go to the PowerShell and update excludes:)
But if you are want to see how to perform this in more detail — welcome under the habrcut.

UPD: Added a script to add selected folder to excluded Defender locations (at the end of the post)
Read more →
Rating 0
Comments 0

Announcing PowerShell 7.0

Reading time 5 min
Views 1.8K
Today, we’re happy to announce the Generally Available (GA) release of PowerShell 7.0! Before anything else, we’d like to thank our many, many open-source contributors for making this release possible by submitting code, tests, documentation, and issue feedback. PowerShell 7 would not have been possible without your help.



What is PowerShell 7?


For those unfamiliar, PowerShell 7 is the latest major update to PowerShell, a cross-platform (Windows, Linux, and macOS) automation tool and configuration framework optimized for dealing with structured data (e.g. JSON, CSV, XML, etc.), REST APIs, and object models. PowerShell includes a command-line shell, object-oriented scripting language, and a set of tools for executing scripts/cmdlets and managing modules.
Read more →
Total votes 5: ↑5 and ↓0 +5
Comments 0

Hyper-V for Developers on Windows 10

Reading time 6 min
Views 5.9K
Hyper-V is more known as a server virtualization technology; however, since Windows 8, it is also available in the client operating system. In Windows 10, Microsoft improved the experience drastically to make Hyper-V an excellent solution for developers and IT Pros.
 
Microsoft Hyper-V, codenamed Viridian, is a native (type 1) hypervisor that directly runs on the hardware, compared to VMware Workstation, VirtualBox, and other type 2 or hosted hypervisors. It was first released in Windows Server 2008, and it allows you to run virtual machines on x86-64 systems.

As mentioned, with Windows 10, Microsoft optimized Hyper-V for developers. Hyper-V allows developers to quickly spin up development virtual machines on Windows 10 with excellent performance, but it is also used in a couple of other development features as a back-end technology, like the Android Emulator, the Windows Subsystem for Linux 2 or Docker Containers. In this article, we will have a quick look at what Hyper-V on Windows 10 can over for developers.
Read more →
Total votes 5: ↑5 and ↓0 +5
Comments 0

Install Powershell Module from Github Repository

Reading time 2 min
Views 6.2K
Hi there!

The latest years Powershell started expansion to other platforms and now works on Windows, Linux, and MacOS (I even managed to start it on raspberry Pi Debian distro).

And nowadays the main way for installing modules is PowerShell Gallery but in some situations, it still convenient to install modules directly from the source (the main reason — the main PowerShell modules repo configured to MyGet or NugetServer).

And it can be painful to install Module from GitHub — you should download archive, find modules folder extract archive content and then copy module folder to the Powershell Profile directory.

Moreover — people like me don't want to create a separate repository for each module (yes, I like the Release-Flow approach) so download and extract only the modules you are like -it even more difficult.
Read more →
Total votes 11: ↑11 and ↓0 +11
Comments 0

Connect to Windows via SSH like in Linux

Reading time 3 min
Views 12K
The most depressing thing for me is to connect to Windows hosts. I'm not an opponent or a fan of Microsoft and their's products. Every product has its own purpose. But it is really painful for me to connect to Windows servers, because of 2 points: it is hard to configure (Hi WinRM with HTTPS), and it is really unstable (Hello RDP to VMs across the ocean).

Fortunately, I found the project Win32-OpenSSH. I realized that I want to share my experience with it. I believe it will help somebody and save a lot of nerves.


Read more →
Total votes 6: ↑6 and ↓0 +6
Comments 0

Windows Terminal Build 2019 FAQ

Reading time 3 min
Views 1.8K

Last week, Microsoft held its Build 2019 conference at the Washington State Convention Center in Seattle. Build is a large event with several thousand people from around the world attending to learn all about the current, newest, and future developer-oriented tech coming from Microsoft.


We had the pleasure of meeting so many of you at our booth and answering all your questions!


Read more →
Total votes 12: ↑12 and ↓0 +12
Comments 0

Introducing Windows Terminal

Reading time 4 min
Views 3.2K

We are beyond excited to announce Windows Terminal! Windows Terminal is a new, modern, fast, efficient, powerful, and productive terminal application for users of command-line tools and shells like Command Prompt, PowerShell, and WSL.



Windows Terminal will be delivered via the Microsoft Store in Windows 10 and will be updated regularly, ensuring you are always up to date and able to enjoy the newest features and latest improvements with minimum effort.


Read more →
Total votes 15: ↑14 and ↓1 +13
Comments 0

PowerShell Basics: Detecting if a String Ends with a Certain Character

Reading time 1 min
Views 1.6K
Did you know you can detect if a string ends in a specific character or if it starts in one in PowerShell? Thomas Rayner previously shared on CANITPRO.NET how this can be easily done by using regular expressions or more simply know as Regex.

Read more →
Total votes 22: ↑20 and ↓2 +18
Comments 0

Authors' contribution