Menu

Virtual Geek

Tales from real IT system administrators world and non-production environment

Blog posts : "powershell"

Set Powershell execution policy with Group Policy

November 17, 2017 02:45PM

In this article I will be covering configuring Windows PowerShell execution policy using Group Policy, to configure environments properly ahead of time for better management, doing this takes less time to get your work done in timely fashion. For example, I gave few ps1 PowerShell script to some of …

Read more

Add multiple proxy addresses with Microsoft PowerShell in Active Directory Groups

October 26, 2017 03:45PM

This article is second part of POWERSHELL ACTIVE DIRECTORY: ADD OR UPDATE PROXYADDRESSES IN USER PROPERTIES ATTRIBUTE EDITOR, In this part, I will be changing proxy addresses on active directory groups using PowerShell script. This is helpful while migration of bulk users and groups to Microsoft Of…

Read more

Find next available free drive letter using PowerShell

October 25, 2017 11:09AM

Below is my one-liner small PowerShell code for finding next available free unassigned first drive letter, I use it frequently for automating mapping shared drives. This is based on Get-PSDrive -PSProvider FileSystem, it shows the all in use drive, Generally A, B (floppy drive not for use as disk or…

Read more

Powershell Trick : Execute or run any file as a script file

October 18, 2017 02:22PM

This blog post is addition to my earlier article Different ways to bypass Powershell execution policy :.ps1 cannot be loaded because running scripts is disabled. Just to recap If you have execution policy blocked in your environment and want to execute riles in PowerShell, you can compile the the f…

Read more

Powershell: Temporary group membership on Windows 2016 Active Directory

October 17, 2017 12:15PM

This is second part of configuring and architecting AD infrastructure new features. Microsoft has introduced new great feature with Windows Server 2016 Active directory, PAM (Privileged Access Management) Feature, Where user can be added to a group for a particular time. Once that Time to live (TT…

Read more

Microsoft Active directory additional features - AD Recycle Bin Powershell

October 11, 2017 01:00PM

I recently was involved and architected IT infrastructure for one of the small startup group, I deployed Windows Server 2016 server and architected Active Directory infrastructure, Startup staff's work was involved using heavy use of AD API in their own software, creation and deletion of AD accounts…

Read more

Powershell: Get registry value data

October 7, 2017 05:05PM

Finding and fetching registry value data information using PowerShell is very easy, I found in one of the organization administrators where doing unnecessary changes to the registry to specific settings, for one of the example ie: I had to get information from one of the setting under HKey_Local_M…

Read more

Powershell Trick: Convert text to ASCII art

October 4, 2017 01:40PM

Powershell text convert to Ascii art demo abcdefghijklmnopqrstuvwxyz0123456789 without online algorithm

As PowerShell has plain command based console if you want to show different font or different bigger font on the same console as output, you will have to use ASCII Text art, I had got a request to write a script to convert any text to ASCII art. Only weirdness in the request I found was, whateve…

Read more

Microsoft PowerShell: Check Windows license activation status

September 23, 2017 02:11PM

This is my version of fetching Microsoft windows license status, for stream lining environment and make compliant as per audit standards, This is old wine in new bottle. I have improvised it to get more information and made it dynamic to get information remotely using CIM(winrm) as well as or WMI(dc…

Read more

Powershell Active Directory: Show treeview of User or Group memberof hierarchy

September 20, 2017 09:32AM

After going through many testing and successfully streamlining most of the Users and Groups member of in active directory environment using Powershell Active Directory: List complete hierarchy of upstream nested groups recursively of User. I was still facing some of the issues, Earlier script was no…

Read more

Powershell Active Directory: List complete hierarchy of upstream nested groups recursively of User

September 15, 2017 05:27PM

Recently I had seen big mess in one of my client's Active directory environment, AD Groups where keep nested into groups and further, Due to this clients where having hard time to get either exact effective permissions of particular users, and causing users have unnecessary authorization or getting …

Read more

SOFTERRA ADAXES - A new way to manage Active Directory

September 2, 2017 08:26PM

What is Adaxes?
Adaxes is a rescuer for any Active Directory, Exchange and Office 365 environment. It gives additional features automates repetitive everyday operations, enhances security, enforces standards and reduces the load on your IT department. Managing your IT environment with Adaxes is sim…

Read more

Powershell Active Directory: ADGroup Managedby - Checkbox Manager can update membership list

August 23, 2017 10:40AM

I found one of the query "How to click checkbox manager can update membership list on Active directory group using powershell" on the whatsapp group Powershell scripting. There is already official MicroSoft blog written for same purpose and there are two parts to it and they are worth reading. I wen…

Read more

Active Directory Powershell: Aduser A value for the attribute was not in the acceptable range of values

August 21, 2017 08:02PM

While writing and testing script Active Directory Powershell: Create bulk users from CSV file, Simulating single user creation I came across an error. This error says.

New-ADUser : A value for the attribute was not in the acceptable range of values
At line:1 char:1
+ New-ADUser -Name TestUse…

Read more

Active Directory Powershell: Create bulk users from CSV file

August 19, 2017 11:00PM

Creating bulk multiple user accounts on Active Directory Users and Computers mmc console is very boring and tough task also it is most of the time consuming and error prone tend to be lots of mistakes. If same task is done using automation it will be interesting and happen in less time. Active direc…

Read more

Different ways to bypass Powershell execution policy :.ps1 cannot be loaded because running scripts is disabled

August 19, 2017 03:12PM

By default PowerShell scripts ps1 extension files are restricted to execute on windows system (For windows 2016 it is by default remotesigned), Generally whenever you run ps1 file you will see below error on Powershell console. This is not the authentication issue instead no one can execute ps1 file…

Read more

Powershell one liner: Create multiple user accounts

August 9, 2017 10:44PM

I had an opportunity to teach PowerShell Active Directory basics to some of my junior subordinate, Where I wanted them to show few test cases on creating multiple active directory user accounts, After building active directory from scratch, As this was the demo example lab, accounts created  running…

Read more

Powershell: Change DNS IP addresses remotely on multiple computers using CIM & WMI

August 2, 2017 08:05PM

Although I had written this script around 4 years back I have again revised it to work it in more better way with status report on console. I used this script again after long time to change/update DNS ip addresses on remote Windows servers, after introducing my new upgraded DNS servers. Same task …

Read more

VMWARE SECURITY BEST PRACTICES: POWERCLI ENABLE OR DISABLE ESXI SSH

July 25, 2017 09:14AM

Logging into SSH required in some of the common troubleshooting scenario or fetching information: ie  checking logs, telnet, ping, esxtop etc, Although subject title of this blog is mentioned Powercli, but I am showing all ways to enable SSH service on esxi including GUI as well, By default SSH serv…

Read more

POWERSHELL CREATE HASHTABLE FROM MICROSOFT EXCEL

July 1, 2017 08:09PM

After writing my last blog on using splatting from INI file, where it has format of Key and Value concatenated with equal = sign. It can be executed easily but sometimes writing INI file can be little messy if there is slight mistake, Still I find INI is best for writing parameter and syntax due to …

Read more

20 Blog Posts