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

Image may be NSFW.
Clik here to view.

If/Else with multiple criteria

Hi guys, creating a function to work with 365 that gathers input to retrieve mailbox info. At present it only has one working option – Search for a specific user mailbox or leave blank for all. What I...

View Article


How to remove quotes from cmd echoing into a file?

Hi Guys, This is probably a very easy one for you, but I just want to remove the quotes before it gets put into a file. To cut a story short – the code is below. echo “$body = (gc Backup.txt |...

View Article


A little help with a WMI query

Sorry if this isn’t the best place to post this, but I couldn’t find a better one. I’m trying to form a wql statement that searches every computer on a domain. I’ve seen where you can use a list of...

View Article

Restrict parameter to specific set of input

I am writing a function and I want input of one of the parameters (UserOffice) to be restricted to a list of 13 of my field offices. For example: Set-NewUser -Username NewUser -Office Chicago I want...

View Article

Appending data to csv

I’m trying to come up with a way to use powershell to append data to the beginning of each row in my csv file. This file has a list of serial numbers on each line. I’m wanting to append the same...

View Article


Output to RichTextBox in PowerShell Studio

I’m currently learning PowerShell and PS Studio as we prepare for our move to Windows 10 which will no longer support VBS (without hack) and want to learn something current anyways. Playing around...

View Article

How To Create Progress Bars in PowerShell

submitted by /u/Net-Runner [link] [comments] The post How To Create Progress Bars in PowerShell appeared first on How to Code .NET.

View Article

How to list (or log) application events at a specific time in Windows...

Is this going to be linked to EventLog? Because it only goes back a month ago and I’ve had my computer for 2 years and I want to view activities view a certain time before my EventLog was “created”...

View Article


Help: Rebooting groups of servers and then checking if back up before...

I’m fairly new to large scritps and still trying to understand how multiple If & then scripts work. What I’m trying to accomplish and I can’t wrap my head around is how to reboot a group of...

View Article


PS2EXE – The module

As part of a project I am currently working on at work, I had a requirement to convert the script to an executable. The main reasons for this were to obfuscate the code (prevent changes) and to hide...

View Article

update-help returns access denied for Active Directory Module

From an elevated powershell console, I ran update-help and get the following error: update-help : Failed to update Help for the module(s) 'GroupPolicy' with UI culture(s) {en-US} : Access to the path...

View Article

Check VAT number on VIES

submitted by /u/amnich [link] [comments] The post Check VAT number on VIES appeared first on How to Code .NET.

View Article

Editing and managing OpenLDAP with PS?

I’ve been tasked with writing some automated scripts for editing entries in an OpenLDAP server. Anyone have any links to documentation on how to do this? Google hasn’t helped me find much. Thanks!...

View Article


How deep do you need to be before you can start making money with powershell?

submitted by /u/LAPRIEST [link] [comments] The post How deep do you need to be before you can start making money with powershell? appeared first on How to Code .NET.

View Article

File management commands?

I’ve found this one to replace parts of filenames including periods. dir | Rename-Item -NewName { $.BaseName.replace(“.”,” “) + $.Extension } However, it won’t work with parenthesis and brackets. How...

View Article


Shortest Script Challenge – Get the shrug emoji ¯_(ツ)_/¯ into the clipboard

previous posts The CHALLENGE: In as few characters as possible get the text shrug into the clipboard. You know this guy: ¯_(ツ)_/¯ Bonus points for the table flip guy: (╯°□°)╯︵ ┻━┻ Leaderboard:...

View Article

PS script to import csv to .contact

Company has a csv file that everyone has to import into their usercontacts folder every week so they can fax. it is doctors faxes. so when you import they become .contact files. It is an annoying...

View Article


Active Directory Powershell: Create bulk users from CSV file

submitted by /u/kunaludapi [link] [comments] The post Active Directory Powershell: Create bulk users from CSV file appeared first on How to Code .NET.

View Article

Creating Linux VM using Powershell (Azure)

Trying to create a Linux VM in Azure using Powershell and I get this message “Since the VM is created using premium storage, existing standard storage account, MYSTORAGEACCOUNT, is used for boot...

View Article

Image may be NSFW.
Clik here to view.

Using Powershell To Automate Downloads From Website?

Hi all, New Powershell user here, was wondering if someone could give me some steer on wheter this is possible please I would like to automate the downloading of several reports from several different...

View Article
Browsing all 8793 articles
Browse latest View live