MRxSmb10 in Services
Does anyone know why MRxSmb10 doesn’t get returned when running Get-Service? submitted by /u/BrnzApe214 [link] [comments] The post MRxSmb10 in Services appeared first on How to Code .NET.
View ArticleCorp Bitlocker Help
Hey all, fairly new to PowerShell and hoping someone can tell me what I’m doing wrong. I’ve been trying to run the following script for a while now, and it looks like at least two other people are...
View ArticleMulti-Level Property Value as Variable in Where Clause
I might be trying something silly, but I can’t figure out how to pull this off: $Property = 'level1.level2' $Data.Where({$_.$Property -eq $Value}) submitted by /u/Sheppard_Ra [link] [comments] The...
View ArticleCustom Powershell Script for Creating New User Accounts
Good afternoon everyone! I’m lazy, and I don’t like having to do work, which is why I set up an MDT Server and automated Workstation Installation. Because of this, I want to learn PowerShell because I...
View ArticleStopping Invoke-RestMethod
Hey guys! I am working on a function for validation against an API we use. I just want to verify that the URL itself is good, and not necessarily complete the actual Invoke-RestMethod. The code:...
View ArticleI like DnD so I wrote a cmdlet to roll polyhedral dice.
function Roll-Dice { [CmdletBinding()] Param ( [Parameter(Mandatory=$true)] [string]$dice, [int]$bonus = 0 ) # Splits number of dice and number of faces $split = $dice -split "d" # Converts split...
View ArticlePowershell Newbie’s First Project
Hey, guys. I just started learning powershell a couple of weeks ago. At my job I’m basically the helpdesk tech. I have a lot more freedom than most helpdesk techs. I’m able to use powershell in my day...
View ArticlePSRemoting via a RD Gateway
Hey Guys, I find myself once again in a RDS environment, this time in a much more infrastructure-oriented position (coming from a .NET MVC job and you better believe I’m glad to be writing PowerShell...
View Articlelooking for advice with a simple Powershell GUI Script
I’m working on an OS deployment pre-flight powershell script. I’m trying to get output onto a Windows form popup depending if there were issues found or not. I’m looking to make a simple form such as...
View ArticleConvert each sheet in word document to a seperate PDF
Hello! Is there a script that takes a single word document with lots of pages, and creates a seperate PDF for each page? And ideally places it in the same folder? My Google-ing hasn’t produced...
View ArticleThis community has been great for learning PS, Where can I go for C#?
I wanna learn more and compliment what i got here. So i grabbed a few videos and a pdf to get my feet wet. When i get to a point where i have specific questions tho, Where is a good place that is noob...
View ArticlePowershell to open an URL that contains /$file/
Hello, I am new in powershell and try to open a pdf file that is stored on a server (via IE or Chrome). This URL contains somewhere /$file/ and because of that, IE is not display the pdf file…. in the...
View ArticleQuestion about Exception calling “CreateDataDrivenSubscription” with “7”...
Hello guys, I’m trying to convert MSDN C# code to PowerShell script. I almost finished the conversion but I encounter some issues for my last line. Here’s the PowerShell script: $Parameters |...
View ArticleNeed haalp! Trying to encrypt a password to a secure.string, then importing...
This is not my own but an example that was found on another site. I am trying to crypt a password, store the crypted password in a shared directory then store it for use on another PC. That way I can...
View ArticleWrite-Color – Multiple colors on a single line!
I had a need to display multiple colors on a single line. Since Write-Host only supports a single ForegroundColor — I wrote this. Code: http://pastebin.com/GiWpLMAA The system uses Color Codes in a...
View ArticleTry / Catch
What is better about try and catch vs if and else? submitted by /u/abetzold [link] [comments] The post Try / Catch appeared first on How to Code .NET.
View ArticleKevMar: Let’s build the CI/CD pipeline for a new module
submitted by /u/KevMar [link] [comments] The post KevMar: Let’s build the CI/CD pipeline for a new module appeared first on How to Code .NET.
View Article[HELP] Installed HDDs vs SQL DB
Hello all, I’ve been trying to think of a good way on how to compare “Get-CimInstance win32_diskdrive” to my SQL DB (I pull the Query information with the command Invoke-Sqlcmd which brings back what...
View ArticleFile renaming with regex issues
I’m trying to rename some csv files using Regex and I’m getting incorrect output. I’m losing the file extension and the variable I’m trying to include as a prefix in the regex is going in as a...
View ArticleAssistance Request – Create New Directory that adheres to a naming convention
Hello, Looking for a little advice/help. I want to create a script that will create a new directory within a current share. The new directory has to adhere to a naming convention and increase by...
View Article