POWERSHELL SCRIPT:: DHCP BACKUP SCRIPT WITH NOTIFICATION

This script can be scheduled from a remote machine to execute across DHCP servers Below command to find list of Authorized DHCP servers, (Get-ADObject -SearchBase "cn=configuration,dc=domain,dc=net" -Filter "objectclass -eq 'dhcpclass' -AND Name -ne 'dhcproot'").name, this can be incorported instead of  [array]$lists = @(“DHCP01″,”DHCP02″,”DHCP03”). Like [array]$lists = (Get-ADObject -SearchBase "cn=configuration,dc=domain,dc=net" -Filter "objectclass -eq 'dhcpclass' -AND Name -ne 'dhcproot'").name Below … Continue reading POWERSHELL SCRIPT:: DHCP BACKUP SCRIPT WITH NOTIFICATION

POWERSHELL SCRIPT :: Request for Certifcate and Import in to Remote Machine

Below script created to achieve certain requirement of include non-production domains servers in to SCOM monitoring, where gateway servers are not available and no PKI environment to issue certificate. First part generate, import, and Export certificate (pfx) with private key and Second part import pfx certificate in to local machine. Need to create Computers.csv with … Continue reading POWERSHELL SCRIPT :: Request for Certifcate and Import in to Remote Machine

KNOWN ISSUE :: POWERPATH INSTALLATION ISSUE (WINDOWS 2016)

Issue: Powerpath Installation failing on Windows 2016 server Operating system. Installation abruptly ended with error “Powerpath detected a problem with MPIO feature” Casuse : MPIO missing Fix: MPIO feature must be enabled before proceeding with installation of powepath on servers. Install MPIO feature from Server manager, restart the server and proceed with Powerpath installation. NB: Always install … Continue reading KNOWN ISSUE :: POWERPATH INSTALLATION ISSUE (WINDOWS 2016)

Ansible playbook for change the root user password

Techworld

Ansible playbook for change the root user password

Requirements:

  • Need to create inventory files with list of hostnames
  • Need to copy encrypted password from /etc/shadow or you can use perl script to generate. Then paste the password to YAML file below.

Syntax:-

$  ansible-playbook -i <inventory_file> <filename.yml>

Filename.yml  contents


– hosts: all
become: yes
vars:
password: Copy the encrypted password values here

tasks:
– name: Change root password
user: name=root update_password=always password={{password}}

View original post

PowerCLI to Migrate VMs across vCenter servers

Below script which was created for a unique requirement with us for migrating our 6.0 vcenter to 6.5 appliance. Since we have planned for complete refresh of the hardware along with vCenter server. we have not used vCenter migration assistance https://blogs.vmware.com/vsphere/2017/01/vcenter-server-appliance-6-5-migration-walkthrough.html We have two vCenter environment with different set of hardware, we had around 25 … Continue reading PowerCLI to Migrate VMs across vCenter servers