Any way to know if an object property is null because there is no value (yet)...
Server 2012 R2, no non-recommended updates to powershell or Windows Management. New to powershell, and windows for that fact. I’m trying to get some disk health information to zabbix (monitoring). I...
View ArticleAdvice for my first functions?
submitted by /u/Jackriip [link] [comments] The post Advice for my first functions? appeared first on How to Code .NET.
View Articledumb little questions regarding csv and args
Hello, I’m embarrassed to be essentially asking you lot to do my homework for me but I cannot for the life of me figure this out. So i am required to create a temporary file and copy the content of...
View ArticleLooking for help understanding powershell.exe execution from task...
My task looks like this: Command: powershell Arguments: -Command invoke-expression -Command "c:scriptsChecks.ps1" Set-ExecutionPolicy Unrestricted -Confirm:$False; import-module PSWindowsUpdate;...
View ArticleNew-PSdrive – Unable to keep -persistent connection working after mapping...
Hello, I recently switched from performing “net use” to “new-psdrive” for mapping my home nas drive, since new-psdrive supports encrypted -credential flag. The problem is, I can’t seem to keep a...
View ArticleWait for input on forms?
I’m wanting to make a checkbox form window that will have all our applications listed and then basically be variables for their respective AD groups it will ask you the computer name at the top of the...
View ArticleNeed help getting this script to run against a list of machines
I have finally tracked down a reboot script that does exactly what I want. It displays a popup message with an option to “Reboot Now” or “Postpone” by 4 hours, 1 hour, 30 mins, and 10 mins. I need...
View ArticleBreaking up results based on if they have multiple or single results
I am running this in my script (Get-WMIObject -cn ComputerName Win32_NetworkAdapterConfiguration).DefaultIPGateway And when I run it on a machine that is in a docking station with a hardwired...
View ArticlePowerShell 102 – Practice scripts
submitted by /u/spuijk [link] [comments] The post PowerShell 102 – Practice scripts appeared first on How to Code .NET.
View ArticleTesting Ansible Roles Against Windows with Test-Kitchen and Pester
submitted by /u/MattHodge [link] [comments] The post Testing Ansible Roles Against Windows with Test-Kitchen and Pester appeared first on How to Code .NET.
View ArticleHow do you retrieve info stored in JSON using invoke-restmethod?
This is actually a follow-up to my previous post. I have no idea how to send a call with invoke-restmethod to retrieve the value of status that is stored in JSON. This is the fiddler’s capture and...
View ArticleSimple Foreach loop, but not producing results looking for.
http://pastebin.com/STuusmh3 The title says it all, I have a csv file of email address that I want to pull the Displayname, Recipienttype, and Title from. As of this writing, I am believing I need to...
View ArticleWhat is your preferred method of having an advanced function output an object...
submitted by /u/challer [link] [comments] The post What is your preferred method of having an advanced function output an object which can then be passed to a second advanced function as input?...
View ArticleWhy Am I getting Bash errors?
ok I have posh-ssh installed and its working but whenever I send this command Invoke-SSHCommand -Index 0 -Command 'cd /efg/app/abcd/somting/TEST; ./maprapi 1.1.1.1 99999...
View ArticleScript to append to another .csv file
Hi can someone please help me with appending from one csv file to another. I have two csv files, just need the data to move from test1 to test2 without removing any data on the csv file. I have the...
View ArticleGPO to Reg question
I’ve been playing with the Get-GPRegistryValue command recently as part of a project. Being able to enumerate the actual values effected by a GPO is phenomenal, but having to supply the key makes it...
View ArticleRequire Invoke-WebRequest be HTTPS
I’m trying to retrieve a file containing sensitive data via a POST statement made to a site’s RESTful API. Assuming my statement looks like this: Invoke-WebRequest https://securedownload.net -Method...
View ArticleCan you explain me the difference between the two scripts?
I am trying to find (eventually delete) empty folders recursively but having trouble with my script. I found the script online from the following website but trying to understand what is the...
View ArticleLog Off Azure Remote App User via PowerShell
submitted by /u/Glass-Water [link] [comments] The post Log Off Azure Remote App User via PowerShell appeared first on How to Code .NET.
View ArticleOut-File write-host data?
Before I go any further, I know this is a silly ask. I’ve run into a bit of an odd scenario and I just want to see if anyone else might have a potential solution. I could go into a lot of detail about...
View Article