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

PowerShell Pipeline Fails Even With $ErrorActionPreference Set to...

I am invoking PowerShell from C# and noticing that setting $ErrorActionPreference to "SilentlyContinue" seems to be getting ignored. When running in an interactive PowerShell session I get no error,...

View Article


Enter-PSSession does not work when a IPV6 address is entered as the -Computer...

I cannot get Enter-PSSession to work with a specific IPV6 address and when TrustedHosts is also set to this address.NOTE:  If TrustedHosts is set to "*", then the command succeeds, so I'm pretty sure...

View Article


Status of Scheduled Task

Hi All,I am investigating if it is possible for PowerShell to check multiple Windows XP client machines for a scheduled task and if the status is "could not run" then it should run some commands.I am...

View Article

What is means means"Transport Type" "Number of Failures" "Last Failure Time"...

when i running repladmin /showrepl    it show status Showrepl_COLUMNSDestination DC SiteDestination DCNaming Context         ismeans  ?Source DC SiteSource DCTransport Type         ismeans  ?Number of...

View Article

Function change my array

Hi guys!I spent a lot of time trying to write and improve this script but there are Always some problems...Look at this:Import-Module "C:\Script\Get-Report.psm1" Function Get-Filter{ [CmdletBinding()]...

View Article


Send-MailMessage question

This might be a dumb question, but...When I do:Send-MailMessage -smtpserver mailout.company.com -From MyEmail@MyCompany.com -To Test@MyCompany.com -Subject "Test" -Body "Test"The mail gets sent out,...

View Article

Get-ADGroupMember limitations

Hi All,I am trying to run the following query:get-adgroup -Filter * -SearchBase "OU=Test,dc=domain,dc=com" | get-adgroupmember | get-aduser -Properties * | Select Name,postalCodeand get the following...

View Article

SMISConfig help problem

My WSUS server has access to both the internet and to my lab for providing updates to my lab, which is not able to access the internet.  I also use it as a transfer for other things required in my...

View Article


Start-process -arguments

Hi,Can anyone see why this is running the program but not passing the arguments across.  It fires up but then closes, with no logs that I can find$startRichCopy = "C:\RichCopy4.0\RichCopy64.exe"...

View Article


Get-WMIObject -Authentication Parameter

I am just curious as to what this actually does. I have a bunch of functions that use Get-WMIObject, to get inforamtion on IIS and restart application pools. So for instance I have the following...

View Article

Powershell - Create Sites in IIS 7 - Site / App Pools Credentials

New-Website -Name testsite -ApplicationPool testsite -HostHeader testsite1.test -Id 3 -IPAddress 123.123.123.123 -PhysicalPath C:\Website_Root\WebSite -Port 80Hi Guys/ Girls, I have added the basic...

View Article

Hyper-V V2 API - changing VLAN of a NIC

Does anyone know how to change the VLAN of a NIC via the V2 API? I appreciate there are now cmdlets for this, I need to modify some v1 scripts, long story. Before, i'd get an instance of...

View Article

HasUniqueRoleAssignments fails in some cases

This is the codeAdd-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null cls $web1 = Get-SPWeb -identity http://siteurl/personal/dom_user1/ $web2 = Get-SPWeb -identity...

View Article


Query SQL DB

I want to query a SCCM DB to find out all the machines a user has logged into.   I have this working using SQL but I wanted to write this in PowerShell so I can run it without having to log into my SQL...

View Article

PS version of "appcmd set config /commit:WEBROOT /section:machineKey y...

Is there a Powershell equivalent to this command?

View Article


Assigning Permissions

Hi,We have 2 domains with a trust.I want to assign 150 User areas in Domain A with Domain B accountsEg John Doe has a folder jdoe . Currently domainA\jdoe account has access. I want to assign...

View Article

Help to outpur the AD groups to which a list of a computers belong

I need to list all the AD groups a server belongs to and I have a list of servers. I can get the list of groups:(Get-ADComputer bounce3 -Property MemberOf).MemberOf -replace...

View Article


Powershell scripts run in console but does not run as Job

Hello,I have a Powerscript script that run great when run in the console but as soon as I create a schedule Job is stops running.The script spawns off child jobs, these child jobs are the one that are...

View Article

Help with script to remove user from groups

This is a two-part question.One of our user admin duties is to remove a user's group memberships when they leave the firm.  I found a script which worked the first few times I tested it but then...

View Article

getting samaccountname from an e-mail address

I need a scipt to get samaccountname from an e-mail address.I have the script for getting samaccountname from display name $mbxlist = Get-Content E:\Sid\Users.txt ForEach ($mbx in $mbxList ) {...

View Article
Browsing all 21975 articles
Browse latest View live


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