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

Expected 3-hour downtime for online PowerShell docs on August 2nd

submitted by /u/jcotton42 [link] [comments] The post Expected 3-hour downtime for online PowerShell docs on August 2nd appeared first on How to Code .NET.

View Article


Editing Group Permissions

Hey everyone, I did a little search, but couldn’t find much. But let’s say that I wanted to edit the permissions on a groupr, how would i go about doing that? In this case i’m specifically talking...

View Article


Validation works with _every_ reference to a $Var inside an “Advanced Function”

howdy y’all, i was playing with a days-in-month function and needed to handle the wrap around for adding 1 to month number 12. the easiest way to do it seemed to be to set the $Month to 0 and then let...

View Article

Output to text file

I would have posted this in /r/vbscript, but that sub seems dead. I have the following vbscript. The purpose of this script is to find user profiles that are dormant (no longer here) and displays...

View Article

[Help] Running Powerpoint Macro using powershell

I have a PowerPoint with the following macro: Sub test() MsgBox “testing” End Sub And a PowerShell script like this: $ppt = New-Object -ComObject PowerPoint.Application $presentation =...

View Article


Windows Subsystem for Linux out of Beta!

submitted by /u/_Unas_ [link] [comments] The post Windows Subsystem for Linux out of Beta! appeared first on How to Code .NET.

View Article

ImpliedReflection: Explore private members like they were public

Very niche module for enabling a exploration mode of sorts that automatically binds private members the same way the PowerShell engine binds public members. GitHub Demo Gif Relevant README bits:...

View Article

Shortest Script Challenge – Get Largest File in Subdirectory

Taking inspiration from /u/spartymcfarty‘s recent short script challenge here. What is the shortest one liner to output only the name of the largest file in your current working directory (and its sub...

View Article


What small thing am I missing?

Good day everyone! As always…I totally appreciate this subreddit. My salary has increased thanks to the information here. I need help with something that I am sure is small: I’m working on yet more...

View Article


How to Conditionally Format Columns Based On Header Name

Hello, I am having some difficulties conditionally formatting date columns in a script. The purpose of the script is to find all files in a folder that have the extension .xls, reformat any date...

View Article

Get-ADUser return text only

Hi, I’m getting stuck on something stupid but I haven´t really found a solution on google. this is my code: $user = get-aduser @ADUserParams | select-object CN | Sort-Object CN $userid = $($userid |...

View Article

Deciphering PowerShell Providers – Petri

submitted by /u/PoSaP [link] [comments] The post Deciphering PowerShell Providers – Petri appeared first on How to Code .NET.

View Article

SWMO PSUG August Meetup (8/1) – PowerShell testing with Pester

submitted by /u/michaelshepard [link] [comments] The post SWMO PSUG August Meetup (8/1) – PowerShell testing with Pester appeared first on How to Code .NET.

View Article


How to get O365 Group membership only in PS?

Can’t seem to figure it out – most scripts I find online are fairly old and aren’t working for me. I want to pull all O365 group membership for a user and pull them from all of them (for term script)...

View Article

Powershell email with attachment help

Hello, my script is: $MyEmail = "xxxxx@gmail.com" $SMTP= "smtp.gmail.com" $To = "xxxxxx@gmail.com" $Subject = "Test" $Body = "Here's the attachment" $Creds = (Get-Credential -Credential "$MyEmail")...

View Article


Console Text Editor?

Anyone know of or know why there is no console text editor built into powershell? I know you can get nano through chocolatey, and I greatly enjoy it, but there doesn’t seem to be a solution for remote...

View Article

Task Schedule Powershell script with Admin rights

Hey Guys! I need some help… Not sure if this is for powershell or sysadmin sub… So i was creating a script where i make myself local admin on the computer after logging in and i wanted to automate...

View Article


Get-ChildItem operations order when specifying -and -or

I currently have a working (and tested) scrip that gets items and performs an action. Currently, there’s 1 $exclusion1 for special snowflakes. Current line Get-ChildItem -Recurse $path |...

View Article

Using the “Filter” keyword – Help capturing output

I recently became aware of the “Filter” keyword that is supposedly the fastest collection filtering option that can still stream objects from the pipeline according to:...

View Article

Question-Is it possible to find inactive O365 exchange accounts via PS?

Want to reclaim inactive licenses. Would PS work for this task? Total PS on Training Wheels User. submitted by /u/Uwantwhat [link] [comments] The post Question-Is it possible to find inactive O365...

View Article
Browsing all 8793 articles
Browse latest View live