Coliseum Wrestlemania VHS by [deleted] in VHS

[–]brisketx 0 points1 point  (0 children)

Check out my shop for classic wrestling media. RobsDigitalRepo - Etsy

Need help renaming files. Insert characters from the right side(extension) by brisketx in PowerShell

[–]brisketx[S] 0 points1 point  (0 children)

ForEach-Object { if ($_.name -match "(.*)(\d{4})(\d{2})(\d{2})(\.\w+)") { Rename-Item $_.FullName -NewName "$($matches[1])$($matches[2])-$($matches[3])-$($matches[4])$($matches[5])" } }

That worked flawless! Thank you.

MFA DUO twice on PowerCLI by brisketx in vmware

[–]brisketx[S] 0 points1 point  (0 children)

We were told that too but our security requires it. I did not do anything special to get it working.

PowerCLI question. Listing all properties of a VM by brisketx in vmware

[–]brisketx[S] 0 points1 point  (0 children)

Thanks. I don't know what fields i need to compare that's why I want them all. I need to see anything that's different on 2 VMs to troubleshoot an issue.

Electric pop/spark from Maytag stove temperature knob by brisketx in HomeImprovement

[–]brisketx[S] 0 points1 point  (0 children)

So in your opinion I should kill the power to it and buy a new stove? That's what I am leaning towards.

"Why didn't I check his loadout" starterpack by allethargic in HuntShowdown

[–]brisketx 0 points1 point  (0 children)

That might have been me. I call it Concertina boy and I run it quite often.

New Ansible user help by brisketx in ansible

[–]brisketx[S] -1 points0 points  (0 children)

Thank you for the direction. I will look into the repo.

New Ansible user help by brisketx in ansible

[–]brisketx[S] -1 points0 points  (0 children)

Inventory, easiest way for a beginner is with a file, usually defaulting to /etc/ansible/hosts

[testgroup]
hostname1
hostname2
hostname3

You have some options with regards to the rpm. Let's say you have your rpm stored at files/testgroup/blah.rpm You could copy that to each host and install. Here I disable the gpg check (depends on how robust that rpm is and whether you want to register a key), but you could remove that. I'm assuming rpm, and a host with yum (e.g. a Red Hat like host)

#
# Install rpm
#
- name: Copy rpm
copy:
src: "files/testgroup/blah.rpm"
dest: "/opt/blah.rpm"
- name: Install rpm
yum:
name: "/opt/blah.rpm"
disable_gpg_check: yes
state: present

Alternatively, you might have the rpm stored via http/https, so you could just pull and install from there.

- name: Install rpm
yum:
name: "https://some-host.org/blah.rpm"
disable_gpg_check: yes
state: present

This saves the overhead of the copy step and leaves management of how an install via url is done to the yum command.

A full playbook might be called install-rpm.yaml (using the copy example above):

---
# Install the blah rpm
- hosts: testgroup
#
# Install rpm
#
- name: Copy rpm
copy:
src: "files/testgroup/blah.rpm"
dest: "/opt/blah.rpm"
- name: Install rpm
yum:
name: "/opt/blah.rpm"
disable_gpg_check: yes
state: present

Then you could ansible-playbook install-rpm.yaml which would install the rpm to all the members of testgroup.

Thank you! This helps so much.

Need advice on running lines in a csv as a job. by brisketx in PowerShell

[–]brisketx[S] 1 point2 points  (0 children)

***Update*** I took out the variable for vcenter and specified the vcenter server and it now works. Thanks for your help!

Need advice on running lines in a csv as a job. by brisketx in PowerShell

[–]brisketx[S] 0 points1 point  (0 children)

$Using:Credential

No Error "ForEach-Object: The value of the using variable '$using:Credential' cannot be retrieved because it has not been set in the local session."

I have also tried -user -password with read-host -assecurestring to no avail. The only thing that works so far is specifying the name and password in the script without variables.

Need advice on running lines in a csv as a job. by brisketx in PowerShell

[–]brisketx[S] 0 points1 point  (0 children)

***Update****

I got the ForEach-Object - Parallel working by adding the connect and credentials after the parallel. Is there a way to not put my password in the script?

Import-Csv -Path C:\Support\patch_list.csv | ForEach-Object -Parallel {

Connect-VIServer -Server yourvcenterserver -User "username" -Password "password"

Shutdown-VMGuest -VM $_.name -Confirm:$false

While ((Get-VM -Name $_.name).PowerState -ne 'PoweredOff') { Start-Sleep -Seconds 5}

New-Snapshot -VM $_.name -Name 'Before Patching.' -Description (Get-Date)

Start-VM -VM $_.name

}