Quantcast
Channel: /r/powershell – How to Code .NET
Browsing all 8793 articles
Browse latest View live

Having trouble getting this script to work….

Hello, A few days ago I posted a script of mine I had converted from VBScript to PowerShell. I had both a command line version and a “GUI” version (it just uses VBScript popup input boxes and alerts...

View Article


A Powershell Menu System

I had the need to write a menu system to make it easier for Jr. level admins to carry out some system admin related tasks. Here is a copy of these scripts. This system also makes use of my Write-Color...

View Article


Suppress PowerShell warnings on remote sessions

Hello, I am fairly new to using PowerShell and am quickly finding it invaluable to my workflow now. I am currently writing a small script to create Office 365 groups more rapidly.   In part of my...

View Article

refactoring parameter to DynamicParam

This is my first attempt at working with DynamicParam(primarily for an autocomplete functionality) and I am getting a bit lost. I am trying to make the param be bound to the code: Get-ChildItem...

View Article

Commands from required modules being reported as in my module

I have a module that I’ve written that uses the ActiveDirectory module for some of its operations. It lists the ActiveDirectory module in the .psd1 file in both RequiredModules and...

View Article


Learn Regex expressions

submitted by /u/saintdle [link] [comments] The post Learn Regex expressions appeared first on How to Code .NET.

View Article

Detecting the new receive-side scaling bug in VMware Tools (with PowerShell)

submitted by /u/codykonior [link] [comments] The post Detecting the new receive-side scaling bug in VMware Tools (with PowerShell) appeared first on How to Code .NET.

View Article

Would this subreddit be interested in Discord?

Pretty self explanatory post. I find it easier to chat about problems in real time than send posts.. could be a nice thing for the community. Thoughts? submitted by /u/wingsndonuts [link] [comments]...

View Article


How to set it so that some of the time, program does A, and other times, it...

For example, what would be the syntax to make my program 30% of the time fold (Move A) 50% of the time call (Move B) 20% of the time raise (Move C) TIA Cheers submitted by /u/chy_vak [link] [comments]...

View Article


Find list of hotfixes missing from list of servers

Ive been able to create script that identifies which hotfix(es) is missing from a list of hotfixes on a server, and what server(s) from a list of servers is missing a single hotfix, but i cant figure...

View Article

While loop doesnt end when it should.

Hi all, running into an issue here. Im trying to make sure that there cannot be less than 2 players in the game, but for some reason that bit of code is backfiring on me Here it is: $players =...

View Article

IF ELSE statement does not properly function

Im trying to get this bit of code to work $userResponse = "Y" $players = @() while ($userResponse -eq "Y") { $playerID = Read-Host "Enter Player ID" $players += $playerID $userResponse = Read-Host...

View Article

How to ask for number of elements, then individually add

Im trying to ask the user how many players will be participating. Say, (s)he enters "5". I want the console to then say, “ok, what’s the name for the first player? the second? third?…etc” and then...

View Article


Can i do this in Powershell?

Hi I do this… $url = “http://homepage.com“ $username=”user” $password=”pass” $ie = New-Object -com internetexplorer.application; $ie.visible = $true; $ie.navigate($url); while ($ie.Busy -eq $true) {...

View Article

Export GPO with Illegal Characters

Hi good folks, I’m trying to export a large number of GPO’s to htm for archiving purposes using the following command but unfortunately it doesn’t work for the majority of GPO’s because of the...

View Article


New Logging Module *Critique Welcome!*

There are a ton of them out there I know, but I couldn’t find any logging function that met all of my needs and did it in a some what elegant way so I wrote one. I started this project with a certain...

View Article

Query IMDB for movies and information.

I want to start out by saying that this is not my original code. I found this code and modified it to work with what I need. I don’t want to take any credit from the original creator. The script was...

View Article


Image may be NSFW.
Clik here to view.

Get-ItemProperty beginner question

Hello, I got a newbie question over here that I hope some experts can answer. I’m trying to search in my servers for foxit reader and the current version. The command I got this working with is: cls...

View Article

Write The FAQ ‘N Manual: Automated Documentation in a CI/CD Pipeline for...

submitted by /u/markekraus [link] [comments] The post Write The FAQ ‘N Manual: Automated Documentation in a CI/CD Pipeline for PowerShell Modules with PlatyPS, psake, AppVeyor, GitHub and ReadTheDocs...

View Article

Issues with wildcards and removing characters from a string.

I’m trying to remove the parentheses and characters in between from a filename (ie: turn hello world (1234) into hello world). Here’s what I’m doing: PS D:> Rename-Item $x ($x -replace " (*)","")...

View Article
Browsing all 8793 articles
Browse latest View live