Trying to follow my class’ powerpoint slides, but my PowerShell outputs...
Hi all, Im learning PowerShell, and I’ve noticed that sometimes the output I should get is not what I actually get. For example, here’s what I should receive as the output: http://imgur.com/a/rLJbI...
View ArticleModules – Only load certain functions depending on PowerShell Version.
I’m trying to finish a Module I’ve been working on for a little while. There’s a .psm1 file with a bunch of functions in it, and a .psd1 Manifest. The issue I’m having is that, when a user imports my...
View Article[Question] Problem help-update
Running PS 5.1 trying to update help and getting the following error message. Tried to Google-Fu it and results are all over the place. Any ideas? http://prntscr.com/e9i4s5 submitted by /u/boxjon...
View Article[Question]Check if particular website is open in default browser?
Is it possible to query the URLs for websites currently open in a user’s default browser or just browser’s in general? I find plenty of resources on opening a particular site but not querying what’s...
View ArticleAutomating Player Character Backgrounds for D&D 5E
submitted by /u/jeffreymcarthur [link] [comments] The post Automating Player Character Backgrounds for D&D 5E appeared first on How to Code .NET.
View ArticleWrote a function to help with remote script / scriptblock execution
submitted by /u/Jackriip [link] [comments] The post Wrote a function to help with remote script / scriptblock execution appeared first on How to Code .NET.
View Article[int] is too small, [string] is faulty; how can I get this script to work?
Hello again all, Here’s a sample script: cls [INT?/STRING?] $x = Read-Host "Please enter a number between 1 and 20" if ($x -gt 10) {Write-Host "The condition is TRUE" exit } Write-Host "The condition...
View ArticleCheck for presence of a specific patch on remote servers
So TBH, i am very green when it comes to scripting in PS. I’m trying to build a simple script to check for a specific KB against a specific list of servers. I have the servers in a text file. I’m...
View ArticleLog your pings!
http://pastebin.com/zna4zdF7 logPing -IP 4.2.2.2 -Hours 1 -Minutes 20 -Seconds 10 -LogResponseType Failures Set the amount of time ping should run for Log successes, failures, or both submitted by...
View ArticleGetting currently installed Nvidia GPU driver version
I want to find the currently installed Nvidia GPU driver version in a certain format, so I can use it to compare with the available versions. I have just found a way to do so, but I’m a beginner so...
View ArticleJson to Hash Table
Good day. I’m reviewing some changes someone made to the PSServiceNow module and trying to roll them into the top level on GitHub. The author of the fork has added a .json file that can be used with...
View ArticleHelp-Clear AD attributes
I’m looking to clear a few attributes from our AD users, I was wondering if this would work Get-QADUser -ObjectAttributes @{msRTCSIP-=’’} | Set-QADUser -ObjectAttributes @{msRTCSIP-*=$null} And these...
View ArticleHow to connect to SRM 6.1 using powershell and WSDL/SOAP
submitted by /u/Candy_Badger [link] [comments] The post How to connect to SRM 6.1 using powershell and WSDL/SOAP appeared first on How to Code .NET.
View ArticleConvert PowerShell-script to VBScript
Hi There, I would like to get some guidance on how to convert this script to VBScript. Get-ChildItem -Path "E:*" -Recurse -Filter *.mdb | Select FullName,CreationTime,LastWriteTime | Export-Csv -Path...
View ArticleImporting a text file into one long string??
EDIT: Okay, not really resolved but I’ve taken this far enough that I am satisfied with the results. This ended up being a bit more complicated than I actually have time to put into it. Thanks for the...
View ArticleNeed help if there is any..lol
I use CMD and Powershell a good amount of time to look up information about the computers I’m working on and do task for me. The only thing I was wondering is, has any come up with a script or free...
View Articleif (test-path) statement returning an error
Hello, Here’s all of my code for the sake of being thorough on details. ## Create 2 command line variables $workingDirectory = $ARGS[0] $directoryName = $ARGS[1] ## Check if variables are empty and...
View ArticleRequesting help with combining powershell commands
I have a list of termed co-worker IDs that are sent me to each day that I go into AD to disable if they have an account. Script one prints out the co-workers on the list that have accounts. The second...
View ArticleEver feel like just asking a Magic 8-ball for advice? Invoke-Eightball.ps1
function Invoke-Eightball { $possibleAnswers = @( "It is certain" "It is decidedly so" "Without a doubt" "Yes, definitely" "You may rely on it" "As I see it, yes" "Most likely" "Outlook good" "Yes"...
View ArticleSingle or double quotes?
I’m trying to update some variables in AD from a CSV file. The command I’m using is below: $users = Import-Csv -Path .user_info.csv foreach ($user in $users) { Get-QADUser -name...
View Article