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

intelli-sense for office 365 commands in vs code

Has anyone got this working? I’d love to ditch the ISE but the commands I use most often (Get-Mailbox, Add-DistributionGroupMember, etc) are not auto completing using intelli-sense. submitted by...

View Article


ForEach Object separate

OK, so I’ve got this listing all the groups in an OU that are global groups. I got the earlier examples and changed it around. Thank you. I want to pipe these results into Get-ADGroupMember. At the...

View Article


While () logic?

I can’t get this piece to work beyond the initial if ($SAM -ne $Null) portion. I want this to loop back to username input each time there is NO value on the InputBox (which it does), and I want it to...

View Article

[HELP] Assistance in creating script

Hello everyone, I’m fairly new to the powershell world. To make it quick, I have about 200 mailboxes in my O365 that I need to convert to shared mailboxes. I found the commands to convert mailboxes, 1...

View Article

Help getting a redirected link URL

I have been driving myself crazy trying to determine whether it is even possible using invoke-webrequest or similar. I have a list of software packages that I want to download from their respective...

View Article


Working on ANUC

On the last post of mine, I’ve got great advices and begin to create a script. Then I found ANUC by Rich Prescott. After some googling, I saw people have modified the script. So that I added all on...

View Article

Out-File with none printable characters?

I had a string with an unusual pattern/sequence of carriage return & new lines. When I write that string to a new textfile and open it in a hex editor, it shows extra garbage at the beginning of...

View Article

Output HTML of latest helpdesk emails – advice

Hi all, I’ve only started using powershell a lot this year, wanting some advice. I made a script that ouputs an html table with the latest 5 emails sent to helpdesk, we use Google Apps here, (G...

View Article


Is there a way to not have to include the same large script block twice?

Hey /r/powershell! I have what seems a simple question. I have a simple if/else statement and a foreach loop. The only difference is the if statement checks for a null value of a variable then it...

View Article


parameter – whole array rather then element

Hi All, I’ve got a function passing data on as 3 properties Gather-UserNames | gm TypeName: Selected.Microsoft.ActiveDirectory.Management.ADUser Name MemberType Definition ---- ---------- ----------...

View Article

Creating tidy forms/Windows

Hey Guys I’m Making a Script that requires a form/window. My line of code is this for the Label : $Label1 = New-Object System.Windows.Forms.Label $Label1.text = “-This tool has been created to remove...

View Article

How to reliably copy to AWS over an unreliable network

Hi, Looking to copy 100GB file to AWS over an unreliable network. Using AWS Tools for Powershell whenever a network drop occurs the copy cancels. Using Cloudberry PSSnapIn the Copy-CloudItem cancels...

View Article

PSFzf: PowerShell wrapper for fzf

Native Windows support was recently added to fzf (https://github.com/junegunn/fzf). I have written PowerShell wrapper around it: https://www.powershellgallery.com/packages/PSFzf/1.1.0 I hope you find...

View Article


Issue with a Loop

Hey all I’m having a big issue with some code that will loop for only parts of it. I’m hoping it’s something that jumps out and is easily spotted as to why the Software Version check stops after the...

View Article

Having issues with Trim() for Double whitespaces.

Hello, Running the following command, I’m seeing double whitespaces that I need to have removed: "Heartbeat.vbs : Value" -replace '(Heartbeat.vbs)','' -replace '(:)',''.Trim() From everything I’ve...

View Article


How can I clear my custom log at first run?

I’m creating a script now that will run every hour but I need to keep track of the records I’m working with. How can I clear my log daily at the first time my script runs ? submitted by...

View Article

Issue with enabling remote mailbox in script

Hey guys! Running into an issue where I can’t enable a remote mailbox when its in a script. I can do it normally, but whenever I run my script, I got a exception error. The type initializer for...

View Article


How to properly get file details from directories

Hello everyone, fairly new to powershell. I’m working on a script to display details from the files in a directory such as it’s Name, Creation time, and File Size. I figured out how to get a user to...

View Article

Help with Powershell Project

Hello All! I need help with my powershell project. Goal Overview: 1) Get all of the systems Hardware IDs and Device IDs 2) Look through all the Hardware IDs and Device IDs and when it makes a match,...

View Article

Import / Export CSV results

Hey folks, I’m after some of your expertise on finding some values within a csv file. I’m in a new job and I’m in the process of automating some of their daily tasks and managed to save them lots of...

View Article
Browsing all 8793 articles
Browse latest View live