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

Storing command declarations in an array, trouble with spaces

I’m working on a controller script to fill in missing values on a CSV from one of our reporting tools. The trouble is that I asset tracking in my organization is lacking due to successive mergers over...

View Article


Running 2 different Powershell commands against a remote-computer. 1 command...

First I’d like to say I’m a complete and utter Powershell idiot/noob/moron. Just so we get that out of the way first. I’d like to use the following Powershell command to remotely query a computers...

View Article


Question. Is there a way to move a group of computers from one OU to another...

I”m trying to move a group of computers from one OU to another. I have all the machines names saved in an excel spreadsheet, but can convert to another format as needed. submitted by /u/rmhuntley...

View Article

Image may be NSFW.
Clik here to view.

Prompt Customization: How do I change ‘>>’ character on a continued line?

Hello, Hopefully an easy one. When you use a ` (grave accent) and the prompt continues on a new line for input, ‘>>’ is displayed. In Bash, you can change this around within a variable: export...

View Article

Installing Hubot on Windows with PowerShell DSC

submitted by /u/MattHodge [link] [comments] The post Installing Hubot on Windows with PowerShell DSC appeared first on How to Code .NET.

View Article


Multiple properties for one variable

Hi, I’m wanting to give my var 2 possible properties. So when they put either y or yes, the command is run. $true = “yes”,”y” This ain’t working….? submitted by /u/Mskews [link] [comments] The post...

View Article

Script Share? Multi-threading (incomplete)

So I am new to powershell and just messing around with pieces of other people’s scripts that they didn’t turn into individual functions. I just posted it to my github… but may need some help finishing...

View Article

Project Honeypot API and Powershell

submitted by /u/I_script_stuff [link] [comments] The post Project Honeypot API and Powershell appeared first on How to Code .NET.

View Article


SCCM and Powershell – Force install/uninstall of available software in...

submitted by /u/TimmyIT [link] [comments] The post SCCM and Powershell – Force install/uninstall of available software in software center through CIM/WMI on a remote client appeared first on How to...

View Article


PART 1 : POWERSHELL – CREATE LOCAL IIS WEB REPOSITORY FOR DSC MODULE

submitted by /u/kunaludapi [link] [comments] The post PART 1 : POWERSHELL – CREATE LOCAL IIS WEB REPOSITORY FOR DSC MODULE appeared first on How to Code .NET.

View Article

[Question] Variable on single line, not outputting to console

Calling different functions that use “write-output $var” to output their results. I can display this to the console by capturing this as variable $foo and then having it on it’s own line. Will display...

View Article

Powershell 2.0 Download

Does anyone have a link to the PS 2.0 download? Still have WinXP at work on some systems and I have a script that some coworkers want to use. Thanks! submitted by /u/cboath [link] [comments] The post...

View Article

Can’t figure out why this error isn’t being caught in Try/Catch statement

I’m trying to determine if a mailbox exists or not, one of the ways im doing this: try { get-mailbox hmc991 -EA Stop } catch { write-host "this worked" } I still just get an error, it doesn’t...

View Article


Test-Netconnection with / variable

Pastebin Here I am getting an error when trying to use test-netconnection on a URL with a /. For example, I can test-netconnection with amazon.com just fine but trying amazon.com/deals fails with:...

View Article

Need Help With MySQL

I’m trying to create a script that creates a new database. What’s the best way to go about this? I’m using MySQL 5.7 submitted by /u/Nintendofreak18 [link] [comments] The post Need Help With MySQL...

View Article


Is there a WAN equivalent of NetConnectionStatus for a NetAdapter in the...

TL;DR My workstation as well as many of our servers have multiple network interfaces. I want to puzzle out how I can Test-NetConnection from a specific local NetAdapter. While my connection to the...

View Article

Export of IIS Sites on a Server

I really wanted to try to do this script by myself, but I am beating my head on the wall. After a few hours of research, I found out why the script doesn’t work on servers not running IIS. The...

View Article


PKI encryption in PowerShell coming in Windows Server 2016

submitted by /u/hornsbyefrain [link] [comments] The post PKI encryption in PowerShell coming in Windows Server 2016 appeared first on How to Code .NET.

View Article

Organize cmd, PowerShell and bash sessions with ConEmu

submitted by /u/marlosawicki [link] [comments] The post Organize cmd, PowerShell and bash sessions with ConEmu appeared first on How to Code .NET.

View Article

Image may be NSFW.
Clik here to view.

Powershell GUI, simple question

I’m a script newbie tinkering around with the Powershell GUI right now, I’m trying to make a simple game like “Connect Four” right now. I wrote a little script to generate a field to play with. Now...

View Article
Browsing all 8793 articles
Browse latest View live