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

New to Powershell Need so much help

Ok I am very new to powershell and the scripts for it however I need to make a script to do the following SSH into server and Call a Argos API using a SSH command ( I have the command already just...

View Article


What are some specific tricks you know with respect to improving performance...

In many ways this is uncharted territory for me. Some of my more specific questions with respect to writing modules and the advanced functions therein include: Regarding the module architecture, how...

View Article


Need help, my function is not passing anything to the body of an email.

function dasa { #query SA- and DA- accounts then report to the ticket Get-ADUser "sa-$name" If ($? -eq $false) { $body += $sa = "No SA- account found" } else { $body += $sa = "SA- account found,...

View Article

PowerShell Help POSH-SSH

I have Posh-ssh installed and I am trying to pass 2 commands New-SSHSession -ComputerName “????” -Credential (Get-Credential) Invoke-SSHCommand -Index 0 -Command ‘ /local/TEST; maprapi 207.999.99.15...

View Article

Something small I cant find, Outlook Powershell o365

$f = $n.GetDefaultFolder($olFolderInbox) Whats the line to make it make a folder, instead of under inbox, but under the main folder? example Instead of Inbox, the root folder (email@domain.com) Edit:...

View Article


Trouble with a basic foreach loop containing 2 cmdlets that won’t work unless...

So I’m trying to create a simple foreach loop that checks the members in an AD group and using their account names in the loop to get Givenname, Surname, Samaccountname, Department, and then running a...

View Article

Handling return data type mismatch

I am writing a script that runs SOAP requests to about 30 different servers, and validates that they return valid data. However, I’ve run in to a edge case, where a server that’s being spun up but not...

View Article

How to push a script through logon GPO that requires PS to be ran as admin?

I have a script I want to push out through Logon GPO that removes bloatware from Win 10 after anniversary update – however I’m not 100% sure how to get around UAC prompt – I can push with a bat file –...

View Article


[question] What’s going on with Write-Host/Write-Output? Or conversely what...

If I simply type: If (1 -eq 1) {"true"} Else {"false"} Then the console prints out “true”. But if I use write-host or write-output, I need to do all this closure crap to get it to print the result....

View Article


Question about Posh-ssh

Is there a way I can ssh and scp and it will only ask me for credentials 1 time? submitted by /u/gearfuze [link] [comments] The post Question about Posh-ssh appeared first on How to Code .NET.

View Article

Script Review: Swap O365 Licenses

My org has two primary license types in O365 that I recently found out requires another group to swap between regularly. I ended up making a cmdlet to try and make their lives easier, especially if...

View Article

Self Signing Certificate for Powershell

Can someone please walk me through how to make self signed certificate for a powershell script. I have a made a script that I want certain users to be able to run but I don’t want them to be able to...

View Article

Waiting for a CMDLET to finish before moving on

I am moving a few hundred user profile folders using Powershell. I have found the Move-Item CMDLET is faster in testing than using RoboCopy so I’m going with Move-Item for my script. I need the script...

View Article


How to decrypt a secure string generated on a Linux host (AES256) in Powershell

I have a developer that wants to transmit data to my Windows Server from a Linux Webhost using AES256. He is providing me with an encrypted plain-test string and a plaintext password I can use to...

View Article

Set up VPN Windows 7 Powershell 2.0

Hi, As the title suggests I want to know if any of you have ever heard of a script that allows me to set up a VPN connection on Windows 7. I’ve read about the Add-VpnConnection cmdlet but it’s only...

View Article


How to move a file from one directory to another

Hi all, If I do this: PS> mkdir temp1 PS> cd temp1 PS> New-Item text1.txt -type file PS> cp text1.text text2.text PS> cd.. PS> mkdir temp2 PS> cd.. PS> cd temp1 PS> mv...

View Article

Sync Folder (one way) with PowerShell – optional over PSSession

submitted by /u/k3ks [link] [comments] The post Sync Folder (one way) with PowerShell – optional over PSSession appeared first on How to Code .NET.

View Article


Problem removing calendar permission for a deleted user in office 365

I have a user Suzie who gave user Anita reviewer permission on her calendar (not their real names). Anita subsequently left and her Office 365 mailbox was deleted before removing permissions from...

View Article

Carbon 2.4.0 Released

submitted by /u/splatteredbits [link] [comments] The post Carbon 2.4.0 Released appeared first on How to Code .NET.

View Article

[HELP] Trying to create a loop to create dynamically named objects

So I’m trying to create several objects to display on a form. I’m using New-Object “System.Windows.Forms.Label” and setting some properties. I’m using this and looping to create the objects, but I...

View Article
Browsing all 8793 articles
Browse latest View live


Latest Images