Menu

Virtual Geek

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

Blog posts : "automation"

Get-PSRepository WARNING Unable to find module repositories

I was at one of my client's location and setting up PowerShell enviroment. I was trying to download few PowerShell modules from online PSGallery with below commands, while received the errors. After trying find and install PowerShell module with required parameters, in both the error outputs it was …

Read more

Oneliner Powershell How to Add and Remove AD users and Objects in Groups members

This is one-liner simple and small active directory powershell script to add or remove AD groups members from text file or a single user, I have already written another few articles in this regards as you can find below.

Installing, importing and using any module in powershell
Powershell one li…

Read more

Docker Error response from daemon i\o timeout internet proxy

In this article after installing docker (How to install Docker on Linux) and configuring its service (Cannot connect to the Docker daemon at unix:var run docker.sock. Is the docker daemon running) next step is to download docker containers from docker hub (internet) for testing purpose.

My dock…

Read more

How to install Ansible on Linux for vSphere configuration

Part 2: Using Ansible for Managing VMware vsphere Infrastructure

managing-Vmware-vSphere-through-Ansible-devops-automation-tool-api-pyvmomi-780x405.png

Recently I took over a task to evaluate few DevOps configuration, automation and orchestration tools to configure VMware vSphere. There are many tools available in the market for DevOps automation. Personally I like and already…

Read more

Connect-VIServer Error: Invalid server certificate. Use Set-PowerCLIConfiguration

After installation of new version of VMware PowerCli module on one of my deployment at client infrastructure. I tried testing it by using cmdlet connect-viserver to vcenter, which was failing with below error. Reading error carefully on the screen, which was telling me, my vcenter’s SSL certificate…

Read more

Microsoft Powershell generate random anything (Filename, TempPath, GUID, Password)

When I write PowerShell scripts, many times I require random file name, folder path, numbers and strings keys, few .net and native PowerShell v5 cmdlets helps me to generate random required information easily, it saves time and don't have to generate random names or number or even password manually…

Read more

Find next available free drive letter using PowerShell

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

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

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

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 from remote computer

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

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

This script is my version of fetching Microsoft windows license status, this is for streamlining environments and making them compliant as per audit standards, I didn't wrote complete script but this is old wine in new bottle. I have improvised it to get more information and made it dynamic to ge…

Read more

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

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

SOFTERRA ADAXES - A new way to manage Active Directory

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

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

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

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

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

VMWARE VSPHERE POWERCLI INSTALLATION AND CONFIGURATION STEP BY STEP

VMWare vSphere suite (vCenter, Esxi and other products) can be managed using powercli, It is software module installed as same as about to deprecate old vSphere c# client. Prerequisite is you must have Powershell on the client desktop or server from you are managing vSphere, by default Powershell av…

Read more

20 blog posts

Blog Search

Page Views

11379494

Follow me on Blogarama