Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Inspiring Powershell Articles
Inspiring Powershell Articles
Inspiring Powershell Articles
Ebook40 pages11 minutes

Inspiring Powershell Articles

Rating: 0 out of 5 stars

()

Read preview

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

LanguageEnglish
Release dateAug 27, 2023
ISBN9798215323922
Inspiring Powershell Articles
Author

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

Related to Inspiring Powershell Articles

Related ebooks

Programming For You

View More

Related articles

Reviews for Inspiring Powershell Articles

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    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

    Enjoying the preview?
    Page 1 of 1