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

Why cant I format a System DateTime correctly using custom formatting?

Hello,When I execute a "ls c:\windows\LogFiles | gm", I see a Typename: System.IO.FileInfo with a Property of CreationTime which is a System.DateTime.  Im trying to format this System.DateTime by...

View Article


Help with setting folder permissions with Powershell

I can successfully create a new directory using Powershell, but I'm not quite clear on how to ADD a user and set their permissions to that directory.  The results I'm having is that the user is given...

View Article


Start-Process Question

Hello All,Does anyone have any idea why the following will not uninstall a version of Java that's less than 7? I could've sworn I had this working a week ago..Start-Process -Wait -FilePath "WMIC"...

View Article

Getting Outlook folder permissions for all Exchange users

I have a script that will pull permissions for all Exchange mailboxes for the calendar folder. This works quite well for just the calendar folders. However, I need to search all folders (not just...

View Article

Send-MailMessage script runs perfect on PSv3, but cannot authenticate user...

This drives me nuts: the code below runs perfectly in PowerShell Version 3. I can authenticate and send mail via live.com and googlemail.com. The password is "hardcoded" in the script, to avoid...

View Article


Remote execution of a script

I'm trying to execute Invoke-Command -ComputerName sp2010 -FilePath C:\temp\Sjov\GetListsItemsX.ps1but it fails will kind of bogus errors, so I think I have totally misunderstood something here.The...

View Article

Problem using CSharpCodeProvider to add types at runtime

I am having an intermittent problem adding C# types from Powershell.  (If this isn't the right forum, please advise me on where to post my question).I originally encountered this issue using the...

View Article

Import Users via PowerShell to AD using CSV

Hi Guys,I am trying to import users from a CSV into active directory. I have the following script but it doesn't do anything.Import-CSV "C:\PowerShell\User\import\Intake2013.csv" | ForEach-Object...

View Article


Cannot index into a null array.

HiI am new to powershell, and as part of my code I have this;New-SPProjectDatabase -Name $PWADB -ServiceApplication $projectserviceapp -Tag $tag$WebAppURL = $WebAppURL $web=Get-SPWeb $WebAppURL...

View Article


Querying WMI-object for Services - How to port check for WMI and handle...

HiI've enabled Active Directory Gateway Management Services on our 2003 domain I can now Powershell AD objects :-)First task of the day. Aim: determine which services on our servers are authenticating...

View Article

Problem using CSharpCodeProvider to add types at runtime

I am having an intermittent problem adding C# types from Powershell.  (If this isn't the right forum, please advise me on where to post my question).I originally encountered this issue using the...

View Article

Cannot index into a null array.

HiI am new to powershell, and as part of my code I have this;New-SPProjectDatabase -Name $PWADB -ServiceApplication $projectserviceapp -Tag $tag$WebAppURL = $WebAppURL $web=Get-SPWeb $WebAppURL...

View Article

How to Loop Through Central Management Server in SQL Server 2012 Using...

I am trying to learn PowerShell.  I want to use it to gather information from a Central Management Server and input the information into a table in a database.  In Windows PowerShell ISE I am trying to...

View Article


Set-ExecutionPolicy Unrestricted - Can I add this to my custom scripts?

As I learn an test PowerShell, I always run the command below so I can excute the ps1 script. Set-ExecutionPolicy UnrestrictedI don't want to leave servers in this state.  Is there something I can put...

View Article

PowerShell - Setting targetAddress Active Directory attribute for all...

Hi,I would like to add all the individual MAC addresses for each corresponding computer account in Active Directory through PowerShell. The list has already been created in a CSV file.The column...

View Article


Powershell and Zip Files

I want to be able to use Powershell to list the contents of a zip file as well as extract the files. Using Powershell v 3.0I've been looking, but havn't found what I'm looking for yet.Paul Arbogast

View Article

How to add Distribution Group email alias from CSV in office 365

Hello Forum! Hope someone can help me troubleshoot this or even let me know if its not possible. But, I used powershell to import distribution groups and set primary emails in Office 365. That worked...

View Article


Autorun a script from Powershell Web Access

Hi Guys,I am looking at building a powershell app within the Powershell web access tool.  I have got the Powershell web app working and am managing to populate the fields required (except for the user...

View Article

create 2 dynamic file names based on file name read from folder

  I need to create 2 dynamic files based upon file name read and populate logs. This is what I tried but don't know how to make file names created dynamic. There could be multiple files in root and I...

View Article

SharePoint 2010 - PerformancePoint Dashboards - How to deploy them to a site...

We developed number of dashboards using Dashboard Designer in SharePoint 2010. We are successfully able to deploy them using Dashboard designer. We have a requirement to migrate them from development...

View Article
Browsing all 21975 articles
Browse latest View live


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