Spiceworks Community » Programming & Development
1,500 FOLLOWERS
This section of the Spiceworks Community is a help and support forum for IT pros working with the languages. Connect with experts, share your code, and get the latest news. Spiceworks is here to assist tech buyers and sellers get their jobs done, every day.
Spiceworks Community » Programming & Development
9M ago
Hello,
we are in the process of migrating to a new data center, which might or might not include server reinstalls, not sure yet, but we have many servers that are not up to date (like not so few 2012r2, which are currently updated for 6000 per month over Azure), and then many in between up to 2022. The goal would be to bring all to 2022. Anyway, we are talking about like 30-50 servers that we need to touch one time (this time). At later point, same requirement will surely arise.
But for the current situation, we are simply overviewing what might be the best path to deploy these servers, and w ..read more
Spiceworks Community » Programming & Development
9M ago
I need to create a powershell script that will install Autodesk Web And Mobile's MSI contents into all users logged into a machine's Appdata folder.
After installing the MSI it will only install to local profiles at this location
This folder: "Autodesk Save to Web and Mobile bundle"
needs to be installed to:
C:\Windows\users\JohnSmith\AppData\Roaming\Autodesk\ApplicationPlugins
Unfortunately it seems it needs to be done this way as there is no way to install this onto Programdata\Autodesk\AutodeskPlugins via the MSI.
Help with getting started or a solution is appreciated.   ..read more
Spiceworks Community » Programming & Development
9M ago
Hello friends, I am developing Sveltekit, the application I am developing is for sending and receiving SMS through SMPP standard.
Everything is working fine, but sometimes there is a connection RESET from the SMSC side and no one can find out the problem, but that is not the problem, I implemented listening for a 'close' event on my end to reconnect the session. It reconnects fine based on the response I received but after that, it doesn't process the `bind_transciever` request, as a result, the `submit_sm` function won't work.
As a result, I always restart the system service which executes t ..read more
Spiceworks Community » Programming & Development
9M ago
I've done around 5 online free "courses" now and they all cover the bare bones, basic same points of Powershell that I'm not finding helpful. I've even paid for two and it all covers the same stuff.....
"Look, it's a command line!" and "Here's how to make "dir" look different and in green text!" just all complete vapid nonsense that isn't teaching anything for the first 10 videos, then barely covers scripting.
Does anyone know of more comprehensive, VERY detailed courses for this? If I can learn Powershell in 4 months enough to make some automation scripts, I can get this Engineer position at ..read more
Spiceworks Community » Programming & Development
9M ago
Good afternoon folks.
I am trying to run an LDAP query against a Domain Controller to include servers with the following requirements:
OperatingSystem=*server* (To include all Servers)
OR
OperatingSystem=*Enterprise* (To include Windows 10 Machines)
AND
Machine isNOT disabled.
If I run the following, I get what I need for servers:
Powershell
Get-ADObject -searchbase "DC=DOMAIN,DC=LOCAL" -ldapfilter "(&(objectclass=computer)(operatingSystem=*server*)(!(userAccountControl:1.2.840.113556.1.4.803:=2)))" | Sort-Object Name
If I run the following, I get what I need for the Windows 10 Enterpr ..read more
Spiceworks Community » Programming & Development
9M ago
Hi,
I have an 2 arrays added to a hashtable, and I want to loop through each item individually but can't seem to.
I could not find how to access an individual array item in the hashtable. In this case I'm trying to loop through DC1, then have its items iterated, then DC2 and have its items iterated as below.
Text
DC1 : NW1 DC1 : NW2 DC2 : NW3 DC2 : NW4 DC2 : NW5
When I try the below it returns all values of the array in 1 go.
Text
$hash = @{ DC1 = @("NW1", "NW2"); DC2 = @("NW3", "NW4", "NW5"); } foreach($key in $hash.Keys){ Write-Host "$key : $($hash[$key])" }
Result
Text
PS C:\Users ..read more
Spiceworks Community » Programming & Development
10M ago
Hi
I am trying to insert / update phone and e mail addresses from external file to the table through component interface application engine.
Basically trying to check whether phone type is in the table if not trying to insert. As Phonetype is key field
if PERS_DATA_AET. EMPLID "NEW" and &oCollPersonalPhone.KEYPROP_PHONE_TYPE PERS_DATA_AET.PHONE_TYPE Then
&oCollPersonalPhone = &oCollPersonalPhoneCollection.insertItem(&i177);
else
above code inserts data if there is only one row for employee. if employee have multiple rows then it is looping through and try to insert both so that ..read more
Spiceworks Community » Programming & Development
10M ago
Assume I want to call (from wrapping DOS BATCH SCRIPT) a powershell script.
Therefore i wrote inside the .bat script:
Text
Powershell.exe -noprofile -noexit -command "& {D:\tmp\testargs.ps1 %args%}"
It works.
However if the path to the .ps1 powershell script contains blank or ampersands I get errors:
Text
Powershell.exe -noprofile -noexit -command "& {D:\this is the path\with blanks inside\testargs.ps1 %args%}"
If I try to enclose the full path to the ps1 script in double or single quotes it doesn't work either
Text
Powershell.exe -noprofile -noexit -command "& {'D:\this ..read more
Spiceworks Community » Programming & Development
10M ago
Assume I have a powershell script foobar.ps1.
I want to call another, external cmdline program (not powershell script) from inside this script (and pass some arguments).
example:
“D:\tools\exiftool.exe” -n “D:\test\sample.jpg”
How can I implement this call?
The calling powershell script should NOT wait for end of execution of the external program but immediately continue with the next statement (even if the called program returns some result (code))
Text
“D:\tools\exiftool.exe” -n “D:\test\sample.jpg ..read more
Spiceworks Community » Programming & Development
10M ago
Hey there.
I’d like to use Visual Code to do a little project and I usually used CodePen, but it doesn't work. If I type a simple div with the word “hello”, it’s not rendered to html. Why?
I installed node.js and I imported react.
The first rows of the code I quoted here are in the html, the others in the js.
If I type them in CodePen they work.
What should I do?
Thank you
Text
Text
import React from 'react'; import ReactDOM from 'react-dom'; class App extends React.Component { constructor(props) { super(props); } render() { return (
hello
) } } ReactDOM.render(, document.getElementById ..read more