Quantcast
Channel: Windows PowerShell forum
Browsing all 21975 articles
Browse latest View live

New-WebServiceProxy class and Namespace

I have an issue that might well be id10t error.  I am trying to call a wcf soap webservice using powershell. Using soapui or other tools I can see all function and methods, but with powershell only the...

View Article


Help to understand why PsObject output has {$null, SomeValue}

Hello,I'm new to hashtables and PsObjects so some help is appreciated, I don't understand why it is doing this.  And I'm no expert powersheller so avoiding powershell shortcuts (and talking extra loud...

View Article


Using variables for the arguments in the Grant-SMBShareAccess cmdlet

The variable for the share was evaluated but the value of the variable represented by the share permissions was not. Is there a way to evaluate its value? Grant-SmbShareAccess -Name $SHARE -AccessRight...

View Article

get disabled AD users from specific OU then set attributes

Hi I'm trying to get all disabled users from a particular OU in AD and then set an attribute. I had this working previously but it was doing it to ALL users across the domainThe below line is the OLD...

View Article

Foreach loop is returning same data multiple times instead of one

Hi all,I cannot figure it out why simple command in foreach loop is returning same data for each object passing it.This is just example$mailboxes = Get-Mailbox -ResultSize Unlimited | ?...

View Article


Time format in powershell

Hi So, i'm not entirely sure if this is the right forum, but i have a weird problem with Powershell on my pc that i can't seem to solve. Firstly, i run two different versions of powershell, i'm running...

View Article

Trouble Importing AdmPwd.PS Module

Hello Everyone,I have recently needed to do some work with LAPS that uses the AdmPwd.PS Module. In the past (as in a few months ago) i had no problems importing the module. Now when I attempt to import...

View Article

Powershell (Exchange shell) list all users Add-ins

Hey, Im trying to get each users add-in from the Exchange Managment Shell but im stuck, the script only runs my admin account and not any other account from the .csv fileWanted Output:User1 ADD-IN 1...

View Article


Windows PowerShell Compare 2 Text Files and Output the difference.

I have been working on a script to compare 2 text files and output the difference into a third text file.Text file 1 contains all applications from a fresh install of the windows 7 OS. Text file 2...

View Article


PowerShell Noob needs help

Im very new to powershell and learning on the fly. I need to create a simple (or I thought) script to grab a CSV file from a URI. I need to export it to a CSV while also adding two new columns that...

View Article

how to check AD for a host ID

Hello-I am very new at this and I have created a GUI to create a host ID for our computers.  I am it generating a random number but I want it to check with AD to see if it is being used. I am...

View Article

Help with logic

Hello.1.  I am searching through a specific OU for computers with a particular model.  Because I do not want to manually enter each model and export the csv, I'm trying to automate it.  I have a folder...

View Article

Just Enough Administration | Format List, tab auto complete

Experts, Isuccessfully configured Just Enough Administration, but pressing TAB not completing the command and the output via Format listor Format table is not working, any ideas ?

View Article


How to run Get-Counter Powershell on the command line?

Hello, Get-Counter "\Hyper-V VM VID Partition(*)\*"    ==> This works fine in a Power Shell window PowerShell Get-Counter                                     ==> This works fine in a command...

View Article

Group policy for MDM enrollment not getting effected

Hi I am trying to create an auto enrollment for my windows 10 desktops into Intune,I have already managed to build all the supported infrastructure and able to  register any windows system in our...

View Article


Manage Microsoft Store apps with Powershell

Hello, first of all we have searched for a long time, but unfortunately we did't find a solution. Is there a way to control the local Mircosoft store with Powershell to install apps? With the commands:...

View Article

Find the third indexOf a character in string

I have a string where in i'm trying to capture the substring before the third occurence of a slash (\) character.I have used IndexOf. Is there a neater way to capture this.$mainstring =...

View Article


Removing an item from the list

Hi,I have the array below, I would like to remove some of the items based on an IF statement.$conffile= @" [OPTIONS] Action="$ACTION" ErrorReporting="$ERRORREPORTING" Quiet="$Quiet"...

View Article

Clear Generic Credentials from Credential Manager

Hello,I am sorry this might be a dumb question, but I am trying to remove/clear Credential managers from ALL users of a remote computer.  The following Script helps me to Clear the credentials from the...

View Article

Conditionally writing application output to PowerShell pipeline

I have a C# console application that outputs text. If the application is run from a PowerShell window I would like to output objects instead of text, so the objects may be consumed by cmdlets...

View Article
Browsing all 21975 articles
Browse latest View live


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