## Stop process before Service # Define the process name and service name $processName = “YourProcessName” $serviceName = “YourServiceName” # Stop the process $process = Get-Process -Name $processName -ErrorAction SilentlyContinue if ($process) { Stop-Process -Name $processName -Force Write-Output “Process ‘$processName’ has been stopped.” } else { Write-Output “Process ‘$processName’ is not running.” } # Stop…
Read more
I am working on updating a process for installing software…I like the audio process for letting me know where in the code I am at in the process. Rough draft see if I can figure a way to streamline this process. #################################################################### ## Write-Host “`n” Write-Host ” ————————————————- ” -ForegroundColor Cyan Write-Host ” | |…
Read more
If you are running a virtual machine (VM) on Hyper-V, sometimes you want to know on which Hyper-V host this VM is running. I work on a lot of VM’s and this is cool part of knowing where to look, especially when troubleshooting. If you don’t have access to the Hyper-V host, you need to…
Read more
I was trying to learn how to create a VM in Windows 2019 Hypervisor with PowerShell. Microsoft Resource was a big help. Some of things that I started to learn was how to setup VM Switches, enable VLAN, create and configure a VM that would show up in Hyper-V and the settings needed to run.…
Read more
API Wrapper links from online sources. A module for simple integration with Atlassian HipChat via the HipChat API. This PowerShell module contains commands to manage GitHub through its REST API. Powershell cmdlets that expose the GitHub API. PowerShell cmdlets for interacting with GitHub Gist. A PowerShell module to work with GitHub Gists. A PowerShell Module…
Read more
Working to get system information in the Batcave. I wanted to create a way to gather system information as part of log file when working with application installations and troubleshooting systems. $CurrDate = $(Get-Date) $CompName = $Env:COMPUTERNAME $IPAddress = ([System.Net.Dns]::GetHostByName($Inputmachine).AddressList[0]).IpAddressToString $IPMAC = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -ComputerName $CompName $MACAddress = ($IPMAC | Where-Object { $_.IpAddress -eq…
Read more