I would post the script as to allow everyone see what you are attempting to do.
Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Posts made by Jonathan.Engstrom
-
RE: PowerShell execution error
-
Feature Request- Server Import Improvment
Hello, I would like to ask that the server import be modified to do a few different things. One, I would like an option to ignore duplicate servers. If I am importing 100 servers at a time, I want the option to ignore those system and import the rest so each server I don't have to stop. Every. Time. There. Is. An. Error. Quite annoying, and an inherent problem working with web interfaces. Another option is to overwrite existing servers with an option to merge the existing server object with updated settings in your json import, as to do new bulk settings. Like if I want to add a new variable to 100 servers that are already in Otter.
Of course, this task would be way easier with a PowerShell Otter Module :D ....
Product: Otter
Version: 2.2.0-beta.10 -
RE: Adding functions in Otter
Update: so for whatever reason, after I left for lunch and came back, this particular gremlin decided to leave. I can call a single script, however, this does not meet my requirement of using separate multiple scripts for different functions, and I cannot run this with a configure block as well; it's one or the other.
So back to square one. Can this functionality be added in to run a script asset in a psensure?
-
RE: Adding functions in Otter
So looking at your example, I tried the "ConfigureScript: test". I have a powershell script asset called test with this in it:
function TestFunction (){
Write-Warning 'TestFunction was successful'
}
TestFunctionAnd this simple psensure:
##AH:UseTextMode
PSEnsure
(
Key: Test,
Value: True,
Collect: >>
$false>>, Configure: >> >>, ConfigureScript: Test
);
Won't run the asset as it says it can't find it, even though I see it fine under assets and when I look where my raft exists in bitbucket, it is there as well.
Even if it did run it, I can only run one script as it does not appear to be an array? That does not meet my requirement of being able to run multiple scripts/functions/assets/ whatever they are called.
So am I probably not explaining this very well. In my PSensure, I have pieces of code that I have to include many different times that I want to keep as a script asset/function, whatever. My intent is instead of duplicating this code 1000 times, I can change it in one place and just call the script from one location while doing my psensure. Make sense?
-
RE: Adding functions in Otter
Hello, I have a simple test function as a script asset:
function TestFunction (){
Write-Warning 'TestFunction was successful'
}And I have the psensure. I have tried to make this is simple as possible for clarity:
##AH:UseTextMode
PSEnsure
(
Key: Test,
Value: True,
Collect: >>
$false
>>,
Configure: >>
pscall test;
>>
);This does not work. I have not been able to call any assets in a PSensure. I have made this example as simple as possible. As far as I can tell, assets don't work in PSEnsure configurations. How can I store PowerShell functions
equivalent in Otter so I can call them in a PSEnsure? Am I doing something wrong?
-
RE: Another API Question
Adding for ideas:
Will need cmdlets to create, edit, delete, start and stop configuration and orchestration work. Allow to accept pipeline input. That way I can schedule at that time, to run an orchestration job, pick the servers based on the results of the orchestration, and run a job at that time for those servers, environments, or roles that fit the criteria.
-
RE: Adding functions in Otter
<crickets>
Anyone? Am I not doing this right, or does it not work that way?
-
WinRM issues
So I am thinking I may have spn issues, and am not able to attempt some of the fixes, so I am stuck with adding a separate setspn to deal with just deal with this. Agent installs are not an option. My question is can Otter utilize session options in WinRM? Example I sound on technet:
As I have seen in this link:
https://www.reddit.com/r/PowerShell/comments/3ze9pp/cannot_use_powershell_remoting_when_a_http_spn/
You can create a port specific spn:
SetSPN.exe -s HTTP/$($env:COMPUTERNAME):5985 $env:COMPUTERNAME SetSPN.exe -s HTTP/$($env:COMPUTERNAME).$($env:USERDNSDOMAIN):5985 $env:COMPUTERNAME
and then create a session using an option:
# Create and use session $sessionOptions = New-PSSessionOption -IncludePortInSPN Enter-PSSession -Computername <computername> -SessionOption $sessionOptions
Product: Otter
Version: 2.2.0-beta.4 -
RE: Impossible to install
I have had issues in the not too distant past, maybe 3-6 months ago upgrading one of my installs of Otter to the latest version, 2.0.9 if memory servers. I would concur that the installs/upgrades could use some love. There definitely should be a 'cleanup' tool to remove all traces of Inedo installs.
Ron, I wouldn't give up on using the products. Maybe you can spin up a vm to try this out on as well?
-
RE: Another API Question
So I think to start off with querying information about the servers:
“Get-OtterServer” by default should return all servers, with their drift status, communication status, environments, roles, variables, configuration plans, packages, executions, and details. So with this, I should be able to run something like this:
$server1 = Get-OtterServer –Server server1.acme.domain
And save all of the information as a variable. The server parameter should of course take multiple values as well as pipeline input that matches parameter name. I can then run things like $server1.ConfigurationDrift to show if it is report only or automatically remediate. Or do $server1 | where-object {$_.variables –like “CPU”} to show the value of any variables that have CPU in the name. Virtually anything. This way the variables can be used for each server like a cmdb system.
The Add-OtterServer, Remove-OtterServer and Modify-OtterServer would serve roughly the same functions. This would be powerful to add, remove, or modify servers based on criteria. The ability to add servers into otter based if they are active in active directory would be very powerful itself, and clean up after x amount of days as well.
If you are coding it in PowerShell 6.1, the “Test-JSON” cmdlet can be used to validate bulk json adds like variables and such.Roles and Environments would share the same pattern.
Should also add a few commands for the Otter server itself, like to restart service, web server service, and maybe some extension updates and such. Eventually add all of the things that are in Advanced menu, and go from there. -
RE: File Copy from UNC Share to server
Alana, I was wondering, when you set up a server in Otter with Agentless Powershell, does it create a PSSession at all? If you can get the credentials from the database into a $cred variable, then with that use that to create a possession, and do a copy-item -tosession from there? Would that be possible? If this can work, it should be easy to set up, and it's awesome as it uses winrm witch already has to be open to use that for communication. Maybe this could be a stop-gap measure for now while something better is made?
-
Feature Request- Show status of Agent or Agentless comunnication status
It would be nice to have a column in the server status that reports the status of agent or agentless communication. Say if a server cannot be reached, change status to closed, and when it is good, change it to open. This should be not be co-mingled with drifted/compliant status. I think it is that way now, but does not appear to be accurate either.
I have many servers, and it would be nice if one could check winrm at a glance. Thanks!
Product: Otter
Version: 2.1.3 -
RE: Adding functions in Otter
So just to update, I have been testing some powershell scripts out. I test them by scheduling a job, and have it write the output and I can see it in the logging. they seem to work when using an Orchestration / Execution plan or job. But I am not able to get it working with a configuration / PSEnsure job. I am not sure if I am missing something or it has a limitation? I would hope one would be able to use reusable code in a Configuration /PSEnsure plan. Ideas?
-
Adding functions in Otter
Hello, I want to start creating small functions of reusable code so I don't have to keep adding them to my plans. I use PSEnsure almost exclusively to maintain consistency across my roles. One of the things I would like to set up is a machine domain check, since we take care of machines in multiples domains and forests. I would basically like to call this function during my PSEnsure and have it output a variable called $DomainMembership for me to be able to utilize as need. For example:
$GetDomain = (Get-CimInstance Win32_ComputerSystem).Domain if ($GetDomain -eq 'abc.local'){ $DomainMembership = 'abc.local' } elseif ($GetDomain -eq 'def.local'){ $DomainMembership = 'def.local' }
I am not sure if this should be a module or script, as it is not clear to me the difference between the two, or documentation on how to get it working.
Product: Otter
Version: 2.1.3 -
RE: Otter Feature Request - Set up a 'collector' of sorts to use in a multi tenant datacenter
Yes, something like that. The master/main server additionally would be set to listen to collector servers. The collector/mini/secondary server would communicate with the host servers like Otter normally does. The exception is that because the clients are unaware of the master/main server, they only send the data to the collector. The collector then sends the data back to the master server. Really, the only difference is adding the ability to one Otter Server to send server configuration data upstream so one can see all of the otter farm (Otter pond? :) )
-
RE: Another API Question
I would be more than happy to help! Let me know what and I can start coming up with something.
-
RE: Can two Otter servers share a raft, or what would be an easy way to copy all my code between each Otter Instance?
So do I set up Otter to the same location as the original raft? Should I have any concerns or gotchas I need to worry about? Thanks!
-
RE: Otter Feature Request - Set up a 'collector' of sorts to use in a multi tenant datacenter
Hello Alana, thanks for the update. I understand the double hop issue with credssp and the challenges using Kerberos. I was thinking of a remote machine that sends it's data to a collector, or a mini Otter server of sorts. This mini server would then send the collected data to the master (mega? :) ) server witch adds the results to it's own. So the client would never attempt to communicate with the master server, only the collector/mini server thus bypassing any double hop complexity. Almost the same principal of a secondary server if you are familiar with Microsoft SMS/ System Center Configuration Manager. Does this make sense?
-
RE: File Copy from UNC Share to server
Hello, I am writing to see how this is progressing. Are there any rough ETA's available? Thanks!
-
RE: Another API Question
So, any thoughts on a PowerShell Module for Otter? I would like to do something like:
Get-OtterServer | Where-object {$_.variables.vcpu -eq 4}
where I have a variable for servers called vcpu. I want to be able to just ask otter for information quickly. If the API is as quick or quicker, or easier, then what would be a good example of this? I am being asked to provide data to managers, and I need to be able to provide them that. Thanks!
-
RE: Otter Feature Request - Set up a 'collector' of sorts to use in a multi tenant datacenter
So are there any other thoughts with this? Does this sound doable at all? Thanks!
-
Can two Otter servers share a raft, or what would be an easy way to copy all my code between each Otter Instance?
I have two Otter servers in different domains. As of right now, they cannot communicate with each other. Can I share a Raft in Otter, or can I make it so they are copies of each other? Looking to avoid copying all of the code manually between each instance. I am using BitBucket Git as code repository for the raft. Thanks!
Product: Otter
Version: 2.1.3 -
RE: Otter Feature Request - Set up a 'collector' of sorts to use in a multi tenant datacenter
Yes, that is somewhat what I was thinking, except for I am not using agents; I am wanting to do this with PowerShell (WinRM).
I have Otter installed in/on one domain, and would like to run a "relay service" on a set of servers that already has access to multiple tenants, and relay the communication from the Otter Server, to the Relay, to the client. Data from Client will start from the client, travel to the relay, then be communicated to the Otter server.
Keep in mind my problem is related to firewall issues and politics, hence the use of WinRM and not agents, thanks!
-
Otter Feature Request - Set up a 'collector' of sorts to use in a multi tenant datacenter
Hello, I have a question for a possible feature request. I am trying to avoid having different installation instances of Otter in separate domains. I would like to run the same code for each servers, but each tenant has their own set of "unique" (/sarcasm) requirements that are prohibiting communications to the existing Otter server. Would it be possible to create a minimal "collection" node that runs as a relayin other environments (AD domains/ forests) to run jobs, collections, executions and reports the data back to the Otter Server? Does this make sense?
Product: Otter
Version: 2.1.3 -
RE: Imported 1058 servers, can no longer pull up list of servers
As I had stated before, I have copied the text of the server name itself from a failed imported server, and created one using the exact same name pasted from the clipboard, and then it would start working. I have not seen any formatting issues, and it appears to be correct. It may be incorrect though, it is a possibility. I have a large project I have been trying to get to work in Otter, and unfortunately this importing issue, and the fact there is no way to work with servers, environments, or roles by addressing them on a command line language like PowerShell. My options are:
-Trying to change the servers by import/export server data to change them. Since my imports have not been rock solid, and have caused me many issues as of late, I have concerns of late with that method.
-Try to access the API to manipulate that.(?) Yeah, since I can't call individual servers, I am working with a glob of data and alot of "noise/clutter". Maybe someone can share with me a good way to do this in PowerShell?
-Add 1000+ servers into Otter using the web interface. Well......, there's that. PowerShell Module please? :D
It would help if there was more verbosity to the logging and/or give me more indications of what the issues are. I am not able to glean anything from the "Hostname not found" error when I can clearly find it without issue. Again, lack of data makes troubleshooting more difficult.
As far as my configuration, it is almost 10,000 lines long, and I have a long way to go yet. I am not sure what is easy or quick about picking 10 servers or so out of that output and changing things.
-
Imported 1058 servers, can no longer pull up list of servers
So after adding about 200 servers in our environment already, I added the other 1000 or so but adding them to their own separate environments and roles that are empty, as well as having basic configurations. They are doing ReportOnly, default raft, and using powershell. Now the screen pulls up an IIS error page when I try to list the servers out. My question is how do I get these removed via import/export or API? I wish I would of saved a copy of the config before I imported it. This is another good reason why it would be nice to have powershell access and not rely on an web/db combo to work with it. Server resource utilization is still pretty low. Help would be appreciated, thanks!
Server Error in '/' Application.
The wait operation timed out
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.ComponentModel.Win32Exception: The wait operation timed out
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): The wait operation timed out]
[SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.<>c.<ExecuteDbDataReaderAsync>b__180_0(Task1 result) +1219418 System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke() +101
System.Threading.Tasks.Task.Execute() +70
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Data.<CreateAsync>d__10.MoveNext() +343
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Data.<ExecuteInternalAsync>d__33.MoveNext() +1237
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Data.<ExecuteInternalAsync>d__7.MoveNext() +364
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Data.<ExecuteTableAsync>d__32`1.MoveNext() +373
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Otter.WebApplication.Pages.<CreateChildControlsAsync>d__2.MoveNext() +377
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Otter.WebApplication.Pages.<InitializeAsync>d__1.MoveNext() +350
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
Inedo.Web.PageFree.<ProcessRequestAsync>d__46.MoveNext() +279
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
System.Web.TaskAsyncHelper.EndTask(IAsyncResult ar) +64
System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +212
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +166Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3163.0
Product: Otter
Version: 2.1.2 -
RE: File Copy from UNC Share to server
OK, that is what I was figuring. I am glad this is being worked on, as it is a "Must Have" for automation and copying files to servers. I wish I could use ProGet for something like this, but I can't install agents on the servers at this time. We have to control how access is configured for specific items anyway, and can't change the Agent Service Account on the fly for that.
-
Another API Question
So, I am looking again at the API, all the while wishing there was an Otter PowerShell Module to manage servers, roles, environments, all the good stuff..... :D
So for the roles, how do I add a role as a dependency to another role? I looked in the json server import/export, and I couldn't even tell where roles list out dependencies for other roles are?
I am doing this as I have not had good luck doing the Orchestration in Otter, and most of my jobs have failed. Plus, I do not want to modify the working code I have in a role and start supporting two different collections of code that do the same thing. So instead, I am adding the servers that I want to change with an empty nesting role that is set to auto remediate. I want to schedule the job in orchestrator to add the role that actually gets the work done at the start of our change window. Maybe Servers should have a change window added to them so they can be auto remediate during the change window, and go back to ReportOnly when they are outside the change window. This way, I don't have to write a psexec script that is just one more thing to manage and troubleshoot. Plus the variables don't seem to work in Orchestrator Jobs, so I end up hard coding all of the variables anyway. Does this make sense?
"Dear Santa, I have been a good engineer and almost always close out my change tasks on time. For Christmas, I would love a shiny new PowerShell Module for Otter, a New York Style Cheesecake, and the bestest Chocolate Chip Cookies"
Also, for anyone having performance issues in Otter, upgrade to 2.12 as soon as possible. Many of my performance issues were improved dramatically, as well has getting an executions tab for each server! Thanks Inedo support people for their great work!
Product: Otter
Version: 2.1.2 -
RE: File Copy from UNC Share to server
Here are the logs from the job history. I am assuming it's not working as it isn't using the permissions assigned to the server, and there is no where to configure what permissions to use. CredSSP is disabled in our environment for security concerns. My account I wish to use is already stored as a credential, so I wish to be able to leverage that to execute jobs.
I already know I have access to the file share, and can copy it without issue.
DEBUG: 2018-12-17 14:14:24Z - Job 216 directly targets 1 server(s) by name.
DEBUG: 2018-12-17 14:14:24Z - Skipping collection run; execute only.
INFO : 2018-12-17 14:14:24Z - Collection run succeeded.
DEBUG: 2018-12-17 14:14:24Z - Beginning execution run...
INFO : 2018-12-17 14:14:31Z - Copying files from \fileserver.domain.local\share\scripts to C:\Temp2...
WARN : 2018-12-17 14:14:31Z - Source directory \fileserver.domain.local\share\scripts does not exist.
DEBUG: 2018-12-17 14:14:31Z - Cleaning up temporary files on Inedo Agent (v??, TESTSERVER:46336)...
DEBUG: 2018-12-17 14:14:31Z - Execution run complete.
WARN : 2018-12-17 14:14:31Z - Execution run succeeded with warnings. -
RE: The "Execution Details" page is a hinderance to troubleshooting issues
John, while on the subject of execution ID's and such, during the logging of a psensure, can we add the psensure key to the log so it always outputs what it is checking and validating? How it is now:
INFO : 2018-12-11 20:31:07Z - Configuration drift detected.
DEBUG: 2018-12-11 20:31:07Z - Adding to execution plan.
DEBUG: 2018-12-11 20:31:11Z - Collecting configuration...
DEBUG: 2018-12-11 20:31:11Z - Comparing configuration...
INFO : 2018-12-11 20:31:11Z - Configuration matches template.
DEBUG: 2018-12-11 20:31:14Z - Collecting configuration...
DEBUG: 2018-12-11 20:31:14Z - Comparing configuration...
INFO : 2018-12-11 20:31:14Z - Configuration matches template.and so on. Maybe it could log something like "Collecting configuration <key>" and "<key> matches template". That way it would make each line meaningful and bring more value into keeping the logs. Eventually I would like to have a way to save a copy of the txt execution into servicenow so we have a record of it in change management system as well. The url you shared previously will help in doing that I think. This improvement would help as documentation for each change. Thanks!
-
RE: File Copy from UNC Share to server
Here is an example I tried doing UNC first, then tried both local paths, and neither worked:
##AH:UseTextMode
Copy-Files
(
Include: **,
From: C:\Temp\Agent\Extensions,
To: C:\Temp2,
Verbose: true,
Overwrite: true
); -
RE: The "Execution Details" page is a hinderance to troubleshooting issues
So I have noticed that there are 'empty' executions id's that are showing an error. When I use your url provided, after putting in some of the execution id's they show an empty page. If I populate it with another execution ID that has logs, it displays that normally, so I know I am doing it right. Ideas?
-
RE: The "Execution Details" page is a hinderance to troubleshooting issues
John, thank you for that; that is very helpful. Is there a way to look up all of the executions that have happened for a server? I tried replacing the ExecutionID with a serverID, hoping it would list out all of the executions that have occurred for that server, but that didn't work :)
It would be awesome to have a tab on each server that listed out a complete history of all of the executions.
-
RE: File Copy from UNC Share to server
I have several examples; none of them are working. I would like to copy something from a UNC path (NAS Device) to copy to a location on one of the server's in Otter (say the C Drive under C:\Temp for example). Something like a file or a folder structure. Can you share an example of how this works in your environment?
-
RE: The "Execution Details" page is a hinderance to troubleshooting issues
Is anyone else able to shed any insight as to why thins is doing this, or share with me an alternative method to finding these logs? I need to troubleshoot this issue, thanks!
-
RE: The "Execution Details" page is a hinderance to troubleshooting issues
George, thanks for the reply. My point was being this page prevents one from finding out what issues are going on as it displays no relevant information. I am not sure where else I am going to find this information without digging in the SQL database, which I really don't want to do/ have time to do.
-
RE: The "Execution Details" page is a hinderance to troubleshooting issues
Yes, I am on 2.1.1. I usually upgrade within 48 hours of new release and a backup of previous DB.
-
The "Execution Details" page is a hinderance to troubleshooting issues
I am having issues troubleshooting executions of servers in Otter with this screen. It has 3 buttons that don't do anything. Why can't the information just be displayed? The "Set Execution Status" button does not do anything, and the other two buttons "View Log Text" and "Download Full Log" only open up another tab in Chrome to the same screen. This does nothing to assist with troubleshooting. Where or how can I troubleshoot these systems? Thanks!
Product: Otter
Version: 2.1.1 -
RE: Otter Database performance using roles as nested containers
Ticket is submitted along with additional information
-
Otter Database performance using roles as nested containers
Hello, I have been using multiple roles that are gathered to one role that I assign to each server as needed. I have two roles that are assigned to each server, one with about 30 roles and another with 15 roles. I do not want to assign these roles to each server individually. Over time, the performance has been getting worse. I have started performance troubleshooting, and have not found any issues (Checked usual Captain Obvious stuff), so I engaged a member of our SQL Support staff. After running a SQL trace, we saw this being executed that was taking between 3-12 seconds a piece. It is called "exec ServerRoles_GetServerRoles " in SQL Server Profiler. Is there a way to optimize this so it does not use excessive CPU? Thanks!
Product: Otter
Version: 2.1.1 -
Bug: Execution Dispatcher timer shows for each machine at 30 second increments it jumps to the next minute
Example it shows for the Execution Dispatcher times for each server. Watching one will show 1:27, 1:28,1:29, and then 2:30. Not a big deal, but a bug nonetheless.
Product: Otter
Version: 2.1.1 -
Service won't start after 2.1.1 Upgrade
I get a "Service cannot be started. System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> " in my event log. I have restarted the machine after trying to restart services, no change yet. SQL is working as other DB's for other apps are working fine. Ideas?
Product: Otter
Version: 2.1.1 -
RE: Trial -> Free
I did not have any issues with Otter when switching from a trial to the free version.
-
Information about $PSCredential
So I am trying to figure out the $PSCredential property. I am assuming it's not as simple as just putting a password in plain text for everyone to see? That would be a total no-go. I am assuming that it is pulling the password that is stored from the user specified in "Resource Credentials"?
If not, is there a way to pull those credentials from "Resource Credentials"? I see in each user, there is a "$GetCredentialProperty() function". I tried searching for an example of that without much luck. I Found this https://inedo.com/support/questions/5094 but doesn't shed alot of light except reinforce my belief of a password in plain text. Can anyone provide an example of how that works? Thanks!
Product: Otter
Version: 2.1.0 -
File Copy from UNC Share to server
Hello, I am trying to copy files from a UNC path (I have access to) to a group of servers. I am copying the latest windows security quality monthly rollup patch before we can install the SCCM client. This has to be done per our security policy. I have tried copy file and transfer file, neither seem to do anything. I guess I could do a psensure and do a get-hotfix to see if they are installed and see if I can copy and install from there? I am doing this with Powershell Agentless, and the creditials used are any admin on the server and full control on the nas folder.
Product: Otter
Version: 2.1.0 -
RE: Update either Server or Role Variables
Alright, after messing around with that information, I was able to get it to work. I am able to update the variables. Interesting thing is that it doesn't appear I can change just one variable, I have to change all of them, or at least enter all of them as they are?
Thanks for your help!
-
RE: Update either Server or Role Variables
Thanks John. I did try a few variations, and after I ended up renaming a server trying to get your method to work, I decided to stop trying. I am not very familiar with the format you are using, and it is different from the documentation. However, I agree that not adding the key to the URL string is probably a safer way to do it, and that process and examples should be added to the documentation.
I still am not able to update a variable, but if one creates a new server, then you can add variables as long as it's a create. Maybe that will help whoever is going to fix it.
-
RE: Update either Server or Role Variables
I am not familiar with this way to do it, and it does not appear to work for me:
Invoke-RestMethod : The underlying connection was closed: An unexpected error occurred on a receive.
This appears to be an issue when using headers, but I have not found a reliable way to fix this.
-
RE: Update either Server or Role Variables
So I am able to update all of the attributes of a server, with the exception of variables. I am able to edit roles, environments, temppath, drift, all without issue. I am not able to change server variables, though. Can anyone test this to confirm it may be a bug, or perhaps I am doing something wrong? Being I can update everything else, I am going to side with the former, but anything's possible.
$Key= 'blahblah'
$Server = 'hdarsintsv1'
$URI = "https://otterserver.test:8626/api/infrastructure/servers/update/$Server`?key=$key"
$Body =
'{
"variables": { "Viking": "True", },
}'
Invoke-RestMethod $URI -Method Post -Body $Body -Verbose
-
RE: Update either Server or Role Variables
Forgot to add this too:
$URI = "https://azlmidrange.azlifem.azl.pvt:8626/api/infrastructure/servers/update?key=$key"
My bad!