Why is the installedon date for get-hotfix rounding? (Noob here)
I’ve got a powershell script that runs through, and grabs the most recent update based on the installedon ScriptProperty. Can someone please tell me why this rounds to the nearest day, instead of...
View ArticleHow to check if update is installed and install only if necessary?
I have a script that I’ve put together (with LOTS of help) that assists in joining new computers to a domain. The first part of the script (below) installs an update that enables PowerShell to add the...
View ArticleVSCode – Workaround for find definitions/references
Reworked VSCode Profile This is kind of a follow up to my post a few days ago about intellisense, including a much better revision of it. The interactive console release has made it a whole lot easier...
View ArticlePowershell GUI as exe Initial load time
I’ve been creating small apps in powershell and as i want to pass them out to people here and there they are not familiar with powershell so i use PowerGui to make it into an .exe however the initial...
View ArticleGet-MessageTrackingLog against all Exchange Servers
I have been struggling here to either script or successfully build a one line command to run Get-MessageTrackingLog against all mailbox and hub transport servers returned by Get-ExchangeServer....
View ArticleNot a programmer. Can’t find anything on the Internet :(Trying to make a WPF...
I’m definitely not a programmer, but I took on the challenge of building an app that essentially works like this: Initially, there is a cmdlet run to gather certain metrics using API Calls. I want to...
View ArticleAnother free ebook – Mastering powershell Vol 2 (on Amazon)
submitted by /u/saintdle [link] [comments] The post Another free ebook – Mastering powershell Vol 2 (on Amazon) appeared first on How to Code .NET.
View ArticleThe ForEach statement and identical values for all objects
Hi Guys! I great Powershell noob here: Here is my dilemma – I am trying to run Performance Monitor Counters against a couple of servers – in production this will be many more – in order to save time...
View ArticleAD user bulk creation with csv
So ive tried a bunch of different scripts to create bulk users from a .csv file. All of the have had on problem or other, and im below beginner level, so i have no idea what to do. I get the error...
View ArticlePSGui: A Gui for asynchronously executing and tracking your powershell...
I suppose most of us had it happen before: You’ve written a whole load of powershell functions that easily cut work of multiple hours to simple method calls, but the coworker(s) that aren’t that...
View ArticleHaving problem using powershell script to launch on service recovery action.
Along the lines of Get-Service -Servicename ‘xxx’ | Set-service -Status Running It then restarts the application pools on IIS, and sends an email. The script workings when I run it manually but not...
View ArticleHow to wait for IE com object AJAX request to be done?
I am writing a powershell script to automate a webpage, and it’s mostly working but I’m stuck at one spot. The page does an AJAX request after I fire an onclick event, and javascript replaces most of...
View ArticleNull-Value error on Get-ADUser
I’m trying to change the IPPhone attribute. The script will take the output of OfficePhone strip everything bu the last 4 chars and put the last 4 digets into IPPhone field.When I run the script I get...
View ArticleWorking with PSCustomObject Outputs?
I just realized that I’ve been using these for a while but, solely for final output purposes. I’ve never used customobjects to feed back into something after. I can’t quite grab all of the output and...
View ArticleSupress warnings on module import via JEA
Has anyone ever come across the issue of supressing error and warning output from module import in a jea endpoint where the module is loaded via role capability/session configuration, rather than in a...
View ArticleNeed a script for a homework assignment
Having a real hard time with this assignment. It has to be Have the script ask the user how many sets of numbers the person wants (using an array) The numbers will be random 1- 59. (ex if you picked 3...
View ArticleNon-work related projects
I’ve mainly used PowerShell in a work environment and it’s increased my productivity exponentially. I make great strides in my scripting journey and continue to explore other outlets for it but keep...
View ArticleRun PowerShell on remote laptops?
I have some laptop users who are often remote and not in the office, and not connected to our VPN. As I develop more PowerShell management scripts, I sometimes find myself needing to run a PowerShell...
View ArticlePSA: Check Out The VSCode PS Examples Folder
If you haven’t already, I suggest you check out the examples folder. Open the command palette by pressing F1 then search for examples. After using the ProblemWatcher and the TaskRunner along with the...
View ArticleDelete folder in directory with oldest last date modified tag.
I have a need to have a script that will check a directory with folders in it, look at the oldest modified date and then delete that folder and its contents on a remote system. Can anyone help me out...
View Article