….is a comprehensive guide for security professionals, penetration testers, system administrators, and both red and blue teams. It focuses on providing the knowledge needed to leverage PowerShell effectively for security operations. The book is authored by Miriam C. Wiesner, a Senior Security Researcher at Microsoft. From her public bio she brings over 15 years of […]
Author: csharp
Retrieve Hashicorp Vault Secrets and Key Names
The web interface that is supplied with Vault has a Search capability, but it is limited. Users are not able to search for nested secrets or Key names. The PowerShell function below can be used to export complete secret paths and the key names. It requires use of the vault command line and that the […]
Crafting an Advanced PowerShell Function with Bing Copilot
In this post, I create an Advanced PowerShell Function that retrieves running services from a specified computer, complete with error handling and network checks, using Bing CoPilot. I’ll include the complete transcript of the conversation Bing Copilot is one of a number of AI applications based on OpenAI’s Large Language Models (I think GTP 4). […]
Disable or Warn Inactive Users
SYNOPSIS:Disable-InactiveUsers.ps1 Disable or warn inactive users that their accounts will be disabled. This script requires the AD comandlets and the ImportExcel module. DESCRIPTION: Disables Inactive users if the -Remediate switch is used. Writes user accounts that would be disabled to file if the -Remediate switch is not used. Creates a folder structure if doesn’t exist. […]
Pode, an OpenSource PowerShell Framework
The fantastic project brought to the Community by Matthew Kelly. Matthew describes Pode as, Pode is a Cross-Platform framework for creating web servers to host REST APIs, Web Pages, and SMTP/TCP Servers. Pode also allows you to render dynamic files using .pode files, which are just embedded PowerShell, or other Third-Party template engines. Pluss many […]
Install Hashicorp Vault OSS version with PowerShell
Find SQL Server MS Cluster Computer Objects In AD
In this post I’ll show a small PowerShell function to identify SQL Server MS Cluster computer objects in AD. The situation I have is that there is no consistent naming standard used when creating MS Clusters in one of my AD environments. Therefore, I needed some other way of filtering out these objects in scripts, […]
Visualizing ESXi Server Daily Average Utilization Using the ImportExcel Module
In this post I will document one method for producing a high-level frequency table visualization of average memory and CPU utilization values of a set of servers. This level of reporting is intended for discussions with management. The raw data has 12 months of data for 33 host machines. The data is in an Excel […]
Refactoring
Refactoring. What is it and how does it fit into the pragmatist approach to scripting?From Wikipedia:“In computer programming and software design, code refactoring is the process of restructuring existing computer code without changing its external behavior. Refactoring is intended to improve the design, structure, and/or implementation of the software (its non-functional attributes), while preserving its […]
Design A Simple and Reusable Word Document Template Using PScribo Part 2
This is the second part to my post on designing a document template using PScribo. Goals: Using the approach from part one, create a minimally reusable solution. Required PowerShell Modules: I tested this using latest Windows PowerShell 5.1 PScribo Required CSV File: Complete Script: