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

Webhook Receiver in Powershell

Hello guys! As the title says, was anyone able to create a webhook receiver in powershell? I want to trigger some actions when I add a task in my Wunderlist todo list (Wunderlist Webhook API)...

View Article


How to store wmi query result in variable

I’m a super noob when it comes to Powershell, I’ve only made basic scripts. I’m about to embark on a project that requires repeating the same task on over 200 PC’s before they’re joined to our AD....

View Article


Trying to fix a julian date output

So, I’m trying to get the Julian day to print out in a yyjjj format. So for example, today is the 25th day of the year. It should be 17025. But instead, I just get, 1725. I’ve tried adjusting it but I...

View Article

Listing Disabled accounts in Message Delivery Restrictions -> Only senders in...

Hi, I have been fetching list accounts in Message Delivery Restrictions -> Only senders in the following command (Get-DistributionGroup -Identity "group_name").AcceptMessagesOnlyFrom |...

View Article

Script for moving files and folders to subdirectory in structure

hey all! hope i can find some help here.. i got following folder structure root/folder_A/somefile root/folder_B/somedir …. i want to create a directory in every root folder like...

View Article


Is it possible to extract the number from a table and use it as an integer?

What I’m trying to accomplish is doing both the following lines $Active = Get-MsolAccountSku | select ActiveUnits | format-table -HideTableHeaders $Consumed = Get-MsolAccountsku | select Consumed...

View Article

Script to change positions in csv

Hi, I found this subreddit and need some help. I have a .csv file and I have to change the order of inputs. Currently I have “Name, Contact, Mail”. I have to have “Mail, Name, FirstName,LastName”....

View Article

ExpandString for a limited set of variables

I currently use $ExecutionContext.InvokeCommand.ExpandString (…) to perform a flexible variable expansion. Of course, this method has access to all variables in the current execution context. What I’d...

View Article


Image may be NSFW.
Clik here to view.

How can I open multiple RDP sessions at once?

Hi all, I’m an IT noob working at a help desk. I was very upfront about my lack of IT knowledge during hiring, but my manager’s MO has always been to hire and train people who don’t know much going...

View Article


Are there any legitimate advantages to writing PowerShell code in Visual Studio?

submitted by /u/challer [link] [comments] The post Are there any legitimate advantages to writing PowerShell code in Visual Studio? appeared first on How to Code .NET.

View Article

Powershell to apply roaming profile permissions to a folder (x-post from...

submitted by /u/tradiuz [link] [comments] The post Powershell to apply roaming profile permissions to a folder (x-post from /r/sysadmin) appeared first on How to Code .NET.

View Article

Copy a XML Node from one document to another in PowerShell

Im trying to Copy specific Nodes from one XML to another. The XML looks like this. <ConfigExport> <SaleItems> <SaleItem> <SaleItemId>2</SaleItemId>...

View Article

DSC Resource Kit Release January 2017

submitted by /u/PowerShellChallenge [link] [comments] The post DSC Resource Kit Release January 2017 appeared first on How to Code .NET.

View Article


PowerShell 6.0 Plan

submitted by /u/dharmatech [link] [comments] The post PowerShell 6.0 Plan appeared first on How to Code .NET.

View Article

Retrieve list of VMs inside the folder structure

Hi, Trying to retrieve a list of VMs that we have running as well as the folder structure behind them (indexed folders relate to their project so we know who manages them). For example: Department 1 —...

View Article


[Question]Beginner question, why can’t I compare these two strings?

I am creating a short script here to check for the computer manufactorer, using WmiObjects. $a = Get-WmiObject win32_ComputerSystem $b = "Example" if($a.Manufactorer.ToString() -eq...

View Article

Advantages of using WMI/CIM over Registry entries

Hi ! As a PowerShell beginer, I was just wondering what are the advantages of using WMI/CIM over the Registry entries to retrieve various information (like OS Version, Physical Memory, Hardware, or...

View Article


Removing Account Unknown

I’ve been toying around with Profile removal scripts and functions for a while now but, I have hit a brick wall with removing the “Account Unknown” ‘s from Advanced System Settings. I’ve found that if...

View Article

Office prank

Fair warning; Use this with care, however it is always fun to mess with people who can take a joke. This little snippet will randomly select a directory on the root of the c:-drive if a user uses cd...

View Article

ReadLine -like help

I’m writing a powershell script that’s supposed to look through a list of e-mails and identify some that follow a particular syntax. I’m not sure what I want to do is possible using just powershell,...

View Article
Browsing all 8793 articles
Browse latest View live