Inspiring Powershell Articles
()
About this ebook
The list of the articles:
1)Creating an Organizational Chart Using Powershell
2)Creating a list of the running security products on computer using Powershell
3)Resetting Local Administrator Passwords
4)Visualizing the Firewall Rules Using Powershell
5)Economy and Aesthetics in Powershell Commands
6)An Interesting Property of Get-service command
7)Windows Services and Their Executable Files
8)Every computer a web server
9)How many users can be created in Windows?
10)Doing Some Biology Using Powershell
11)Generating Fibonacci Numbers
12)Collatz Conjecture in Powershell
13)Drawing sinusoidal wave in Powershell
14)If console::beep() command in Powershell does not generate any sound
Murat Yildirimoglu
1964 yılında doğdum. 1988 yılında ODTÜ Elektrik/Elektronik Mühendisliği bölümünden mezun oldum. Mezuniyet sonrasındaki ilk iki yıldan sonra sürekli olarak bilgisayar alanında çalıştım. Bilgisayar alanında 7 kitabım var. Bir tanesi ("TCP/IP";) 15. baskısında bulunuyor. Cumhuriyet gazetesinin Bilim-Teknik ekinde, Bilim ve Gelecek dergisinde çok sayıda bilim konulu makalem yayınlandı. Uzmanlık alanımın, zor teknik konuları anlaşılır şekilde yazmak olduğunu düşünüyorum.
Read more from Murat Yildirimoglu
Windows Command Prompt Rating: 0 out of 5 stars0 ratingsTCP/IP for Everyone Rating: 4 out of 5 stars4/5Windows Security Basics: User Accounts Rating: 0 out of 5 stars0 ratingsInternet Information Services 8.5 Rating: 0 out of 5 stars0 ratingsBilgisayar Dünyasından Portreler Rating: 5 out of 5 stars5/5Two Stories Rating: 0 out of 5 stars0 ratings
Related to Inspiring Powershell Articles
Related ebooks
AZ-104: Azure Administrator Mastery Rating: 0 out of 5 stars0 ratingsPodman in Action: Secure, rootless containers for Kubernetes, microservices, and more Rating: 0 out of 5 stars0 ratingsCloud Computing Security A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsDesign Patterns in Modern C++: Reusable Approaches for Object-Oriented Software Design Rating: 0 out of 5 stars0 ratingsBreadth First Search: Fundamentals and Applications Rating: 0 out of 5 stars0 ratingsSCRUM: Mastering Agile Project Management for Exceptional Results (2023 Guide for Beginners) Rating: 0 out of 5 stars0 ratingsLinux Programming Tools Unveiled Rating: 0 out of 5 stars0 ratingsMCTS 70-515 Exam: Web Applications Development with Microsoft .NET Framework 4 (Exam Prep) Rating: 4 out of 5 stars4/5Security Development Lifecycle A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsDemystifying the Azure Well-Architected Framework: Guiding Principles and Design Best Practices for Azure Workloads Rating: 0 out of 5 stars0 ratingsEnterprise Architecture at Work: Modelling, Communication and Analysis Rating: 2 out of 5 stars2/5Seven Deadliest Unified Communications Attacks Rating: 0 out of 5 stars0 ratingsNoSQL Injection for Elasticsearch Rating: 0 out of 5 stars0 ratingsLinux Services Deployment Rating: 0 out of 5 stars0 ratings50 Recipes for Programming Node.js Rating: 3 out of 5 stars3/5Ultimate Hacking Challenge: Hacking the Planet, #3 Rating: 5 out of 5 stars5/5Oracle Database Transactions and Locking Revealed: Building High Performance Through Concurrency Rating: 0 out of 5 stars0 ratingsHow to a Developers Guide to 4k: Developer edition, #3 Rating: 0 out of 5 stars0 ratingsHacking of Computer Networks: Full Course on Hacking of Computer Networks Rating: 0 out of 5 stars0 ratingsVisual Basic 2010 Coding Briefs Data Access Rating: 5 out of 5 stars5/5Foundation Dynamic Web Pages with Python: Create Dynamic Web Pages with Django and Flask Rating: 0 out of 5 stars0 ratingsConfigMgr - An Administrator's Guide to Deploying Applications using PowerShell Rating: 5 out of 5 stars5/5Footprinting, Reconnaissance, Scanning and Enumeration Techniques of Computer Networks Rating: 0 out of 5 stars0 ratingsJava: Tips and Tricks to Programming Code with Java: Java Computer Programming, #2 Rating: 0 out of 5 stars0 ratingsJava: Tips and Tricks to Programming Code with Java Rating: 0 out of 5 stars0 ratingsBasics with Windows Powershell Rating: 0 out of 5 stars0 ratingsWindows Batch File Programming Rating: 2 out of 5 stars2/5
Programming For You
HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Learn PowerShell in a Month of Lunches, Fourth Edition: Covers Windows, Linux, and macOS Rating: 0 out of 5 stars0 ratingsLearn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5The Unofficial Guide to Open Broadcaster Software: OBS: The World's Most Popular Free Live-Streaming Application Rating: 0 out of 5 stars0 ratingsCoding All-in-One For Dummies Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Hacking: Ultimate Beginner's Guide for Computer Hacking in 2018 and Beyond: Hacking in 2018, #1 Rating: 4 out of 5 stars4/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Python Projects for Beginners: A Ten-Week Bootcamp Approach to Python Programming Rating: 0 out of 5 stars0 ratingsSQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5The Little SAS Book: A Primer, Sixth Edition Rating: 5 out of 5 stars5/5Teach Yourself C++ Rating: 4 out of 5 stars4/5Pokemon Go: Guide + 20 Tips and Tricks You Must Read Hints, Tricks, Tips, Secrets, Android, iOS Rating: 5 out of 5 stars5/5Web Designer's Idea Book, Volume 4: Inspiration from the Best Web Design Trends, Themes and Styles Rating: 4 out of 5 stars4/5
Reviews for Inspiring Powershell Articles
0 ratings0 reviews
Book preview
Inspiring Powershell Articles - Murat Yildirimoglu
Inspring Powershell Solutions
By Murat Yıldırımoğlu
Smashwords Edition
Copyright 2023 Murat Yildirimoglu
Creating an Organizational Chart Using Powershell
There are many properties of a user account that are neglected and left untouched most of the times, like Description and Manager fields, in the Active Directory domain.
If we enter relevant info into these fields, we can get more information about user; its title, its manager and its direct reports.
On the other hand, it is understandable too not to enter such info because info about users changes frequently so, it must be updated periodically.
But let’s assume we have domain that those info about users entered correctly:
In the above figure, description field shows that there are a CEO, some VPs and Directors. The rest are the soldiers.
And, in addition to the Description field, Manager field for users is entered correctly too, like in the following figure:
Then the following code will create a nice organizational chart:
$list=get-aduser -filter * -Properties * | select name,description,manager #get the users’ name,description and manager properties
New-HTML -OnlIne -FIlePath $PSScrIptRootMyDIagram.html {
New-HTMLDiagram {
New-DiagramOptionsLayout -HierarchicalEnabled $true
New-DiagramOptionsPhysics -Enabled $true -HierarchicalRepulsionAvoidOverlap 1 -HierarchicalRepulsionNodeDistance 100
$list | foreach {
$desc=$_.description
$nameuser=$_.name
switch ($desc){
ceo
{new-diagramnode -label $nameuser -level 0}
vp
{new-diagramnode -label $nameuser -level 1}
director
{new-diagramnode -label $nameuser -level 2}
default {new-diagramnode -label $nameuser