PowerShell: Stop Service, Rename dir, copy dir, run the make link command, start the service, close session..
Budget: $30 – $250 USD
Hello,
I just needed an assist chaining together to reduce some steps.
Basic steps:
1. PShell targets to a list of servers in 2 windows domains.. S:\Servers.csv
2. Stop a current windows service “signalfx-agent”
3. Rename the service directory from C:\“SignalFxAgent” to: "SignalFxAgent_v5.1.6 "
4. Copy in a new replacement directory “SignalFxAgent” as C:\SignalFxAgent
5. Create a symbolic link with command: mklink /D "C:\SignalFxAgent\etc\signalfx" "C:\ProgramData\SignalFxAgent"
6. Start the Service
Some basic debug in there might be helpful in case of issues or perms in one domain or the other.
I'm local admin on the tools machine and the targets so should be fine, but just in case we can add in if you can think of something good for debug steps.
I just needed an assist chaining together to reduce some steps.
Basic steps:
1. PShell targets to a list of servers in 2 windows domains.. S:\Servers.csv
2. Stop a current windows service “signalfx-agent”
3. Rename the service directory from C:\“SignalFxAgent” to: "SignalFxAgent_v5.1.6 "
4. Copy in a new replacement directory “SignalFxAgent” as C:\SignalFxAgent
5. Create a symbolic link with command: mklink /D "C:\SignalFxAgent\etc\signalfx" "C:\ProgramData\SignalFxAgent"
6. Start the Service
Some basic debug in there might be helpful in case of issues or perms in one domain or the other.
I'm local admin on the tools machine and the targets so should be fine, but just in case we can add in if you can think of something good for debug steps.
Related categories:
Powershell