Function Displays Incorrect Data on Server 2012
I've got a very odd situation. We have a simple PS function the uses .NET DirectoryServices to do a Simple Bind to a Novell eDirectory server, and return a few values of a object (function below,...
View ArticleUse of SQLSERVER:\SQLPolicy pointing to a specific instance causes accesses...
Running Powershell 3 on W2012 server using SQL Server 2012Within Powershell ISEimport-module"sqlps"-disablenamechecking (Get-ItemSQLSERVER:\SQLPolicy\server1\Instance1).fred()Returns (as...
View Articleintermittent : The term 'get-date' is not recognized as the name of a cmdlet,...
I have developed a batch harness whereby all scheduled tasks (W2012) invoke a common powershell script that acts as a wrapper to all our housekeeping jobs.The first step in the wrapper is to create a...
View ArticleStart stop action in powershell
GreetingsI am working in System Center Virtual Virtual Machine manager 2012 and I am utilizing the "view script" feature when doing certain actions in VMM. For example, in the script below, I have...
View ArticleExchange 2010 - Get-Mailboxpermission and security groups
Hi all,Apologies in advance if this question has been asked before however i'm failing to find any resources online about it.I am doing a migration from Exchange 2010 > Office365 and need to run a...
View ArticleConnecting to remote computers
We are designing an application to connect to remote computers. We have two options to connect as session. :> PSSession or CIM-Session There is a little detail on comparison between the two...
View ArticleServer2012: Set-ClusterScheduledTask + "Run with highest Priviledges" - ???
Hey there,I'm trying to fix a script we have to trim VSS copies on our Fileserver which is a Serve 2012 Failover Cluster. This has worked in the past, however I think it got messed up when I changed...
View ArticleAzure Active DIrectory and Domain List
I have been trying to find a way to get a list of all Active Directory's associated with a given subscription as well as their domains. Any commands for this?
View Articlescript to read file and check
need help creating powershell script which can read excel file as belowMachineIDApplicationIDApplicationNamePackage...
View ArticleComparing two arrays (ip values ranges/subnets etc)
I'm trying to use two arrays to compare ipsubnets and ip-ranges but can't seem to work out why when I try comparing say "192.168.0.10 - 192.168.10 against "10.152.0.1-10.152.0.10 the script reports a...
View ArticleCopy & Paste Excel cells with data and color
I need to copy & paste Excel cells with data and fill color. The following PS will copy and paste A1 (green) and B1 (red) from Sheet1 to Sheet2. After running, the data is copied over and the fill...
View ArticleHow to change the static IP Address of a Failover Cluster Instance with...
I found this in the documentation for DHCP , but I am planning to use this machine for a DMZ implementation thus I cannot get away with DHCP? Get-ClusterResource "IP Address 172.24.11.0" |...
View Articleneed some help -- regex
I have this script where I'm tryying to parse a file based upon KEYWORDS and then setup an email with my content from the parsing. The data appears as below example and will always have the word END...
View ArticleCan Get-DNSServer produce output in readable CSV or TXT and not XML?
Hello,A Get-DNSServer -CN MyDC1 run from the console produces a nice formatted list of info to the console. An export-csv of this same data gives me headings, but no data. An Export-Clixml works, but...
View ArticleGetting a list of users and permission from a folder
I run this command to get a a list of users and permission from a folder$project_folder = "\\servername\foldername" get-acl $project_folder | %{ $_.Access } | ft -property IdentityReference,...
View Articlefind word in a text file and return boolean
Hi,How do I search for a "keyword" in a text file, if keyword found i just want to have returned $true, and if not found return $false. Please suggest me anything other than .contains method because...
View ArticleUsing Get-ChildItem to set file count variable not working
Hello, I am trying to count the number of files in a given folder. I pass the folder path as a parameter. i.e. F:\SQLServerBackupFile\Test.There are two separate groups of files that I need to...
View Articlequerying network printers
If I open the Windows Printer and devices I see a list of local and share printers. I have a vbs script that retrieves such printers that are display on the interface. if I ran Get-WMIObject...
View ArticleOnly a part of an array is choosed
Hi Guys!I've got an array only a part of this array is choosed but i want to choose all the array:The code:function Move-EmptyDir{ [CmdletBinding()] param ( [Parameter(Mandatory =...
View ArticleStrange behaviour in "Do - Until" statement
Hi,I'm having a strange behaviour in a script I'm creating. The purpose of the script is to update some files in some folders. In the case that more folders need to use the script, I'm importing the...
View Article