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

OnCall Notification Email – Real Basic – need concept help

I have 10 users in a list (CSV), and they rotate on call. They need an email to remind them they are on call. Each user is oncall every 10 weeks. Week 1 is Joe, week 2 is Sue, etc. On Week 11, Joe is...

View Article


Image may be NSFW.
Clik here to view.

powershell.office.com is down?

Does anyone know what happened to the site? It’s been down for a few weeks now. I saw a post about connecting to O365 and I wanted to reference this great site but it’s still down submitted by...

View Article


How to prevent ConvertTo-Json reordering input object?

I am feeding in a hash table into ConvertTo-Json for a web request. When I print the JSON object, I see that the properties/values are reordered. Is there a way of preventing this? Snippet below:...

View Article

VPN PS Script

I found this awesome script to create a Meraki VPN Tunnel with split tunneling. It works like a charm! I am not script guru and i’m already hours into trying to get this to work. Can someone tell me...

View Article

Advanced Autocompletion – Part II

submitted by /u/1RedOne [link] [comments] The post Advanced Autocompletion – Part II appeared first on How to Code .NET.

View Article


CSV Batch Account Disable

Hello, I’m pretty new to powershell scripting but I’m trying to disable all the users on a csv I created. The csv file contains the SAM account names and the script I found here on this subreddit...

View Article

Object Connect Failures in AD

Running into a weird situation I can’t get around: [PS] C:Windowssystem32>Set-ADServerSettings -ViewEntireForest $true [PS] C:Windowssystem32>Get-ExchangeServer | Where {$_.AdminDisplayVersion...

View Article

Image may be NSFW.
Clik here to view.

Exiting a script if AD user already exists.

Hi all Currently have a nearly working (operative word there being ‘nearly) script to automatically create a new AD user. I want the script to check if the user already exists, and to therefore...

View Article


Exchange Online Delivery Management

Hi all, I am wanting to pull the delivery restrictions on all distribution groups on exchange online but am having some problems trying to find how to do this. First thing I did was played around in...

View Article


Setting Manager from Display Names

Hey everyone, I’m slowly starting to get used to powershell and I’m having a bit of trouble trying to get this figured out. I have a CSV that has two colums, a user name and a manager name, however...

View Article

Code Converter Cheat Sheets

submitted by /u/l33t_d0nut [link] [comments] The post Code Converter Cheat Sheets appeared first on How to Code .NET.

View Article

Help with get-psdrive

This is what I currently have Invoke-Command -ComputerName server1,server2,server3,server4 {Get-PSDrive -PSProvider FileSystem} | where {$_.Free -gt 0} | select pscomputername,Root,used,free The...

View Article

Powershell array help

Hi everyone, Im a newbie in powershell, so please bear with me. Im in a need for help. Im currently trying to write a script that gets the directreports from a manager in AD -> pull the sip address...

View Article


Need help to get data from xlsx with the goal of looking up values from a...

Hello r/powershell, my old friend. I’ve come to talk with you again. I have a spreadsheet with DistinguishedName in column L and I want to look up the SamAccountName for all rows in column L and write...

View Article

Anyone know of a bit of code to tidy up people’s names?

I’ve foolishly agreed to do some scripty CSV manipulation for a client. It’s customer data and they’ve asked for an element to tidy up user names. I set off (thinking this’d be easy) with ‘everything...

View Article


Best way to copy a file to multiple computers?

Okay so please forgive me, i’m literally on my 3rd day of learning PowerShell. My question today is the following: What is the best way to copy one file to multiple computers in one fatal swoop?...

View Article

Lesson Learned this Morning with Invoke-Command across domains

I had some Kerberos issues today where I could: Get-ADComputer <ServerName> -Server <DomainName> but not: Invoke-Command <FullyQualifiedServerName> -ScriptBlock{ <SomeScript> }...

View Article


Still Cant get shared drives mapped

Here we go again. What i am trying to do is create a small scrip batch file to sit in our user’s desktop for re-mapping drives if they are disconnected, literally i expended 10 hours trying to map...

View Article

How to upload Custom Images to Microsoft Azure using PowerShell

submitted by /u/Net-Runner [link] [comments] The post How to upload Custom Images to Microsoft Azure using PowerShell appeared first on How to Code .NET.

View Article

while loop in powershell

Hey! I trying to while ($whatever -eq 1) {do this stuff} but I want to add a exception to this while loop, if the value -eq 2 instead, then I want it to do something else. Anyone? submitted by /u/tr4p...

View Article
Browsing all 8793 articles
Browse latest View live