Quantcast
Browsing all 21975 articles
Browse latest View live

search managedby not present using -filter, not -ldapfilter

Hello all,Trying to use get-adgroup -filter to find groups with "managedby" not present. I realize I could easily use the -Ldapfilter to accomplish this, but I'd like to know if it's possible...

View Article


Script to Find Inbox Size From a List of Users

Here's the prob -- I have a list of about 100 users out of 7100 and I'm looking to import/use that list (.txt) to find their respective Inbox size (Inbox size only) and total cumulative size of all 100...

View Article


Logon script : Invoke other user for management task

Hello,When my user logon, a logon script is run. This logon script should delete a file on the computer. But, the user doesn't have right on that file. I have try this : $pwd = ConvertTo-SecureString...

View Article

how to string replace "..." ?

How can I replace the string "..." ?  $TEXT = $TEXT -replace ("...","") - returns gibberish.  ".." is considered a special character/token for ranges.  I'm not sure how to escape it.  My goal is to...

View Article

Encoding with IO.File

I need to reada large file (1,5 Gb).For performance issues, I'm trying to use the [IO.File] instead of the Get-Content, but am having trouble withaccents.If I'm not mistaken,my fileis ANSI.Follows the...

View Article


Need to fetch local server administrator group membership list from 100...

Need to fetch local server administrator group membership list from 100 windows serversKindly help in this.Many thanks in advance.

View Article

Having troubles with this powershell script:

Import-Module ActiveDirectory Get-ADUser -Filter * -SearchScope Subtree -SearchBase "OU=Users,DC=Domain,DC=Local"  | Set-ADAccountPassword -Reset -NewPassword (ConvertTo-SecureString -AsPlainText...

View Article

Very odd return behavior

I have a function that is sometimes returning something totally different from what I would expect. Most of the time it returns True or False, but sometimes it is returning the utterly odd 32, ,0,True...

View Article


How to get VMM resource access permission using powershell

Hi everybody, Does anybody know how to get VMM resource access permission using powershell ? Using Grant-SCResource and Revoke-SCResource, it's possible to grant or revoke access to a resource. What...

View Article


Get-VM to list VM name only

I am using following command to generate text file of all Windows servers that are powered onGet-Vm where {$_.guest -match 'windows'} | where {$_.PowerState -eq 'PoweredOn'} | Out-File...

View Article

Is there a comprehensive book or tutorial on working with Excel using...

Is there a book or tutorial on working with Excel objects using PowerShell ?I see all sorts of fragmented subject matter articles and book chapters on using PowerShell code to edit or run Excel...

View Article

Powershell exit codes

Hey All,i am using a software to run powershell scripts.what i need is to get two possible error codes from Powershell: 0 - there was some error, any error, while running the script.1 - the script has...

View Article

Export-Clixml Performance Issues

I have a data collection script that pulls information from multiple data sources (mainly from AD) and builds arrays of custom PSObjects.  Once I have the information stored in variables, I like to use...

View Article


Need help with using Get-Process in Conditional Logic

Hi, So i'm trying to write this small script to get the status of a process on a list of servers using Get-Process.  So when i run the below code i dont get the results as expected. It doesnt check for...

View Article

Sent and Received history - Exchange Powershell Export

Hi,I am needing to export the history of a specific set of users. I have been looking at the Get-MessageTrackingLogs command but I am having some troubles with it and was hoping someone could help me...

View Article


Powershell response very slow

I have win 2012 R2 server Datacenter with Hyper-v role enabled. I am making powershell remote calls to get VM details from Hyper-V but everytime call takes 5-6 mins.I am calling commands like get-VM...

View Article

Script error

I am running the follwoing script for a remote computer. PS remoting is enabled on remote computer Function GetUpTime { param([string] $LastBootTime) $Uptime = (Get-Date) -...

View Article


Add security group to OU security

Hello,Fairly new to scripting as I'm trying to achieve the following scenario via Powershell:1) Create OU "TestOU" (done)2) Create user "Testuser" and place user in existing security group "TestGroup"...

View Article

Change html text color inline

Hey all so I have a script the pings some machines and adds them to a html file as well as a log file if I can't reach them. However I want to make the machines that have been offline for more than 3...

View Article

Probably a problem with if statements

I'm trying to use system.net.webclient to invoke a website. This isn't a problem but the way I've got it is I'm monitoring multiple mailboxes and invoking the website on new mail. If a new mail comes...

View Article
Browsing all 21975 articles
Browse latest View live


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