This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PowerCLI password script | |
# By: Jason Greene | |
# Get vCenter login | |
$vCenter = Read-Host -Prompt "Enter the vCenter hostname:" | |
Write-Host "Enter vCenter login credentials" | |
$cred1 = (Get-Credential) | |
# Ask for new/old password | |
$oldpw = Read-Host -Prompt "Enter the OLD root password" -AsSecureString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat >/etc/yum.repos.d/rh.repo <<EOF | |
[rh] | |
name=RedHat 7.6 Repository | |
baseurl=http://<ip or host>/repos/rhel-7-server-rpms | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release | |
[rh-extras] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create client .repo file | |
cat >/etc/yum.repos.d/rh.repo <<EOF | |
[rh] | |
name=RedHatRepository | |
baseurl=http://<ip or host>/repos/rhel-7-server-rpms | |
gpgcheck=1 | |
enabled=1 | |
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release | |
EOF |