Get the largest video files except few directories
Hello everyone,I am writting a script to get the largest video files on network, except few directories. I have a problem with Get-ChildItem cmd let. I am using include and exclude in pipe and it won't...
View ArticleSecurity problems with executing powershell script with Windows 8
Hello,I have a problem with executing a Powershell script on Windows 8 that is executing fine on Windows 7.The script does the following: 1) Applies a snapshot on a vm in Hyper-V and starts the vm; 2)...
View ArticleWindows Powershell 3.0 get/set Single A record From group of same name A...
hi there, i made a program about a mounth ago which updated my A Records for my DNS server, this was great as at the time i only had one DNS server, and had a DYnamic IPv4 public adresshowever i now...
View ArticleLimit running time for a function?
Hi. I am trying to create a Powershell Form application for fun. It seems like most things are working as they should, but I am struggeling to find out how I can set a time-limit for my function to...
View ArticleRead-Host Default statement
So my script looks like this1$UserIopsIntervalInput = Read-Host "(IOPS - sample interval), How often do you want a sample taken (in seconds, default is 1)" 2$UserIopsPeriodInput = Read-Host "(IOPS -...
View ArticleExport-CSV does not place the data into seperate columns
Hi Gurus,I am trying to create an inventory from my environement. If I run the following command it doesn't save the data into seperate columns. As a result I don't have the option to filter the...
View Articleset .sql file as variable
I have a powershell script where I set the variable based on a query like this: $Query = "SELECT t1.BSM_NM ,t1.D_DTM AS MAXDATETIME ,CASE WHEN SUM(t1.V_CUST_BLK_CNT)/SUM(t1.V_ATT_CNT) >=...
View Articleenable/disable outlook rule
Is there a way to enable/disable a local client outlook rule through powershell?
View ArticleChanging .Value To.MB
I am running the following query but I'm not able to convert the value to MB ,@{Label="Test";Expression={$_.ProhibitSendQuota.Value.ToMB()}}Not sure what I'm doing wrong, the attribute is...
View ArticleAny way to run a powershell script in a directory with spaces in it, just by...
Hello,Is there anyway to run a powershell script in a directory with spaces in it, just by doubleclicking on it?For example I browse to c:\my folder with explorer and click on myscript.ps1, it won't...
View ArticleProblem creating OUs with Powershell
Hello Everyone:I could use a bit of a hand: I am trying to automate the process of OU creation using Powershell.Problem: I am able to create a base OU named Managed Objects and place a sub OU under...
View ArticlePowershell Script Quest One Snap-in Slow When Not Logged Into Domain
I have a powershell script that uses the Quest One ActiveRoles Management Shell for Active Directory snap-in. Scenario 1When I'm in the office, the script runs very quickly (1 min). No...
View ArticleHow can I combine this query?
$Username = Read-Host "Username" Write-Host "Searching Domain Controllers..." $DomainControllers = Get-ADDomainController -Filter * ForEach($Controller in $DomainControllers) { Get-ADUser -Identity...
View Articlewmi filter only works when negated twice
Has anyone ever saw this before and/or do they know whats causing it? When i try to run the query with the filter of 10.1.% it doesn't return anything. But when I negate the filter twice, I am...
View ArticleHow to know when an install is done installing
I am trying to install a patch via powershell but i cant figure out how to know when it is done installing.Powershell returns before it is done installing. What i think is happening is when i call the...
View ArticleImporting from csv and Exporting to csv in Powershell to query AD
Hi,Here's the story, i have a csv file that has close to 10000+ users listed in AD. The csv file has their name and title. (EX: Doe John, Manager)I'm trying to see if it's possible to query AD for the...
View ArticleRemoting issues
Very new to powershell here........I've got a script that I've pieced together to remove and reinstall java. The script runs fine locally, runs fine when I enter-pssession on a remote workstation and...
View Articlereading multiple row lines from query in power shell.
I currently have a powershell script that returns one row of data, the script goes like this: $Query = "SELECT t1.BSM_NM ,t1.D_DTM AS MAXDATETIME ,CASE WHEN SUM(t1.V_CUST_BLK_CNT)/SUM(t1.V_ATT_CNT)...
View ArticleHow to Set-Timeout for the Cmdlet "Get-Service"
Hi Team,I am Running an Script for Filling some of our Automation Need, One Part of the Script Code Use the Get-Service Cmdlet to fetch the data if the necessary Service is installed on the Target...
View ArticleWindows Management Framework 3.0 and PS Remoting
Hello, after upgrading my Windows 7 x86 clients to WMF 3.0, I can no longer PS Remote to those machines (using Invoke-Command or Enter-PSSession). The same update, applied to Windows 7 x64, does not...
View Article