Quantcast
Channel: PowerShell
Browsing all 15370 articles
Browse latest View live

O365 Connection function - Scoping?

Hi all,I wrote a function that will quickly connect me to O365. It works find when I create the function in my session, but not when I put it into a module. I.e. I can dot source the function from...

View Article


Keep a PS Window open after script

I'd like to run a powershell script and have the window stay open after it's finished running. This is to remotely login to another server using requested credentials, when you run the script as is it...

View Article


Automating An Annoying Task

I need to automate a boring task. Long story short, I want to be able to check the past 7 days of .txt files for a pattern or if there is a blank document generated.I am a novice when it comes to...

View Article

Powershell novice

This is a silly question but when a code has $._ what does it mean? I have been looking for an explanation but Im finding it hard to find.

View Article

Powershell command to connect to remote SQL server

Hi Guys,I am trying to come up with a powershell script that would connect to a remote server which has SQL Server management Studio installed, using read only credentials and then querying off the...

View Article


Powershell - Cannot bulk edit AD Users using PS script

Problem: Cannot edit all Users in AD using this basic script:Get-AdUser -filter * | Set-AdUser -PasswordNeverExpires $trueHowever, single user works fine:Get-AdUser -Identity test.name | Set-AdUser...

View Article

Powershell - Output issues

I'm using PS to connect to an Oracle DB, run a query, then email me the results (when results exist). Everything is working properly, except that the output is one long string. If I write the output in...

View Article

Powershell counting question

I have a query that I am trying to put together that spits out a total of how many machines are running a version of windows.  My problem is I am trying to output the data to a html file and the data...

View Article


Create a powershell script that gets hardware stats on remote computers?

Hey all, I am hoping to get a powershell script that will get hardware stats on remote computers. Mostly just: RAM, disk drives, (if there's a way to get array size/drives - great), serial number,...

View Article


Powershell - extract one value and one of the following line

Introduction (as it is a bit complicated to explain in three lines :-) ):I have several important laptops with 10 or more WIFI connections stored (company locations, home WIFI, etc) here, that need to...

View Article

Convert an array to a string

I want to ensure I am looking and reading my powershell book correctly.I can take an array and pipe it as a string in commands:example:Text$hsbuilding= @(9,12) to be used...

View Article

Creating Functions in powershell

Hello, me again, been reading some Powershell books and looking at my existing code and was wondering if I could/should convert aspects of code to be functions to call:Here are two in particular: This...

View Article

Use Powershell script to automate Curl POST request

I am in the process of setting up a print environment that utilizes the Labelary API to convert incoming ZPL print jobs to PDF, then print the resultant PDF to a specified printer. While I can manually...

View Article


Making sense of PS output

Why does the last line of...

View Article

Security Groups for disabled users in a single OU

Hi, really new to Powershell, but trying to learn fast.My first challenge is to find out which security groups all disabled users belong to, which are in a particular OU, and if possible to send...

View Article


How to get Powershell 5.1 without Windows 10 Anniversary Edition?

Hi folks,Our antivirus product is not compatible with the Windows 10 Anniversary Edition, but I need Powershell 5.1 to use the AWS Powershell tools.  Anyone know of a way/place to get the WMF and...

View Article

Can't figure it out

I'm not terrible sure what I'm doing wrong - i am using a script to find the logged in user from here:https://gallery.technet.microsoft.com/scriptcenter/Get-LoggedOnUser-Gathers-7cbe93eaWhich is the...

View Article


Powershell - Set delagate private access

Hello, I want to set delegate access on a users mailbox and grant private items access.I know this can be done via Outlook, but i want to know if this can be done via powershell - its far more...

View Article

PowerShell RoboCopy and Invoke-Command

I am using PowerShell to distribute a client folder to local and remote PC’s. The PowerShell script uses Robocopy to update distribution points, at that point I would like to use the Invoke-Command to...

View Article

Powershell IF statement to exit script not working.

Hey guys,In the (Check to see if the SAPgui version is already up to date) part of my powershell script it pulls the version correctly as I want it to with a table that states ProductVersion 740, patch...

View Article
Browsing all 15370 articles
Browse latest View live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>