Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Reply To: Check Exchange configuration Change

I don Do you think if a create a PSSession with an alternate Credential (with Exchange Permission) in the Module and pass the PSSession with my Exchange CMDlet that I will be able run the cmdlet as...

View Article


Reply To: Check Exchange configuration Change

Alain, I think you're trying to use DSC for something that it was not designed for. Don, please correct me if I'm wrong. My understanding is that DSC has been designed to configure, monitor and...

View Article


Reply To: Check Exchange configuration Change

Hi Daniel Thank for your response The particularity of Exchange, it is because some configurations are local on the server and other configuration are store in Active Directory. To be able to read,...

View Article

Reply To: Advice for HTML System Report

Dave, thanks for the feedback. Especially the compare and contrast of styles. This helped me see things from a different perspective. Thanks again.

View Article

Trouble Scheduling Browser Window to Open

I tried to use PowerShell to launch a website every weekday… but it's not working as I expected. What am I missing? $trigger = New-JobTrigger -Weekly -DaysOfWeek Monday, Tuesday, Wednesday, Thursday,...

View Article


Reply To: Trouble Scheduling Browser Window to Open

Looks like the Register-ScheduledJob creates scheduled tasks which run in the background (and has no option to specify otherwise.) You'll have to modify the scheduled task after Register-ScheduledJob...

View Article

Variables persist outside of loops?

Hi, I had a quick question about using variables inside of loops. I noticed that if create a variable inside a foreach loop that the variable still exists once i am outside of the loop. This seems a...

View Article

Reply To: Variables persist outside of loops?

PowerShell doesn't support the detailed scoping you're referring to. Read about_scope in the shell for details, but briefly what you're seeing is the designed behavior. Keep in mind it's a shell, not...

View Article


Handling Array With Multiple Object Types

Hi again, another curious question. I'm trying to handle an array of users in local groups by doing the following: $groupuser = Get-CimInstance -Query "SELECT * FROM Win32_GroupUser WHERE...

View Article


Reply To: Handling Array With Multiple Object Types

This should do the trick: $users = $groupuser.PartComponent | Where-Object { $_.CimClass.CimClassName -eq 'Win32_UserAccount' } $users

View Article

Not Returning innerHtml values

My goal for this script is to pull the IDs that are on one of the lookup sites that I have. This script allows me to log in and run the users names that are stored in a csv through the site. cls...

View Article

Reply To: Handling Array With Multiple Object Types

Beautiful! I will definitely need to peruse namespaces more for valuable items like this.

View Article

Reply To: Variables persist outside of loops?

Ok thanks for the info. I'll check that out

View Article


Reply To: Variables persist outside of loops?

Bodies to PowerShell keywords (for, foreach, if, switch, etc) execute out in the scope of wherever that keyword is used, as you've discovered. However, ScriptBlocks have their own scope unless they're...

View Article

Inproper encoding?

Paste this into Powershell Prompt (or ISE) and Char returns "å". Save this as a .ps1 file and executing it and it returns "A¥". ~~~~ $Char = "å" $Char ~~~~ I've tried swathing the encoding but nothing...

View Article


Reply To: Inproper encoding?

There are two possibilities that I can think of, off the top of my head. The encoding of your file might not support that character properly, or, if you're using PowerShell.exe, the console encoding...

View Article

Reply To: Inproper encoding?

I'm running the script in the same window I'm manually inputting the $Char = "å". Do you have the same problem if you put the two lines into a script vs pasting it into PowerShell.exe? Joshua

View Article


Reply To: Variables persist outside of loops?

That's pretty cool. Thanks for the tip. It will definitely come in handy.

View Article

Reply To: Not Returning innerHtml values

There's really nothing we can do to help with this, without having access to the website itself. Webpage scraping, particularly through IE automation, is a very error-prone and fragile process. If...

View Article

Reply To: Not Returning innerHtml values

The website is a company one and i only have access to retrieve information, not to modify. As for the Invoke-Webrequest, Powershell v1 is installed and i cant install the anything higher. Thanks for...

View Article
Browsing all 13067 articles
Browse latest View live