collect processname and put into an array
Hi,How can I get ONLY the values of the ProcessName column from Get-Process and put it into an array ($arrProcessName). I will need to loop through the $arrProcessName to do some further work.
View ArticlePowershell unzip with shell.application not working when launched from...
I have a deployment agent on a machine implemented as a windows service. Service is 32-bit and runs on windows server 2008R2 x64 SP1 with powershell V2. Powershell script requires elevation and to run...
View ArticleSetAuditRuleProtection($False, $True) and Set-ACL
$acl = Get-ACL ...#do some stuff to the DACL#mark SACL to inherit audit$acl.SetAuditRuleProtection($False, $True)While this sequence of events will not break SACL inheritance, it will not restore SACL...
View ArticleNot able to add active sync ids
The below script isnot adding the active sync ids. what I am doing wrong. see downCSV file andResult$CSV|ForEach{ $arr=$_.SerialNumber $result=$arr.split(",")...
View ArticleNot able to add active sync ids
PS C:\temp\dell> Get-CasMailbox tuttlsx | fl name, active* Name : TUTTLSX ActiveSyncAllowedDeviceIDs : {$_.SerialNumber.split(",")} ActiveSyncBlockedDeviceIDs...
View Articleimport-csv to Sql
I'm trying to import a file to SQL and I have 2 issues where the string value won't load to my datetime and integer fields I have defined in SQL. The Effdate and Line seem to be my problem during...
View ArticleGet-Acl Returns SIDs Rather than Object Names
Hello. In Powershell, when I run Get-Acl [NETWORK FOLDER NAME] | Format-ListIt returns only the SIDs of Active Directory Objects (such as security groups) rather than the readable names of the objects...
View ArticleHow can I set permission for a shared folder?
Hello,I want to share a folder and set permission for the shared folder. I've shared the folder. I used "net use z: \\server\folder" and "$shares=[WMICLASS]"WIN32_Share"...
View ArticleXML Attribute "inheritance"
I have a scenario where each Element in a node could be either "User" or "Machine" in scope, which I am defining with an attribute. Some nodes will be all one or the other scope, and some may have a...
View ArticleGet product keys of local and remote systems
Hi,Im trying to rung the following script: http://gallery.technet.microsoft.com/scriptcenter/Get-product-keys-of-local-83b4ce97But it doesnt display anything, I have tried with attributes also for...
View ArticleCant find overload for method but this overload exist in .net
I try this on my windows server 2012...
View ArticleMissing ')' in method call - Exporting Certs using variable.
Running from powershell command prompt, I get success.dir cert:\currentuser\my | Where-Object { $_.HasPrivateKey -and $_.PrivateKey.CspKeyContainerInfo.Exportable } | Foreach-Object {...
View Articlesearch keyword in log and read that line
Hi, I have a log, where I am searching for a keyword, then read the whole line. Here i am looking for a the keyword "TOTAL" which appears in different places in different logs. So i cannot use 2nd line...
View ArticleCompare printers on 3 servers, export to csv side by side
Hi all,I am trying to create a print server check, basically i want the script to run grab all printers and export them side by side in a csv file. Right now i just have it create 3 seperate csv files...
View ArticleGenerate a hidden password
Hi,I need to create a script that creates a zip file and creates a password on the zip file. Because each zip file needs a different password I need a reliable way to create the password but a way to...
View ArticlePowershell change hostname in a workstation or member server joined to the...
Hi, I use the powershell to change a machine name, I use $name as variable to input a name and the follow cmd-let: $computerName.Rename($name) but it only work in a unjoined domain machine.my script is...
View ArticleHow to make powershell script.
How to make script that copy content from notepad to other notepad and reverse the text?
View ArticlePowerShell and SharePoint - comparing data from an array
I have data ( a date) in a SharePoint list that I am trying to compare to data in an array (multiple dates). If the array has one item in it, it works, more than one it fails. The SharePoint list...
View ArticlePowershell integrated with sqlcmd - Logging the output
Hello Guys,I am new to using power shell and my scenario has too many variables for me as am still relatively new. I have power shell scripts which restore databases on SQL Server 2000, 2005 and 2012...
View ArticleDuplicates in the results of my scan...not sure why?
Hello,I'm using the following bit of code to scan all computers in a file to look for the IP Address, Subnet Mask, DNS Servers, MAC Address and Gateway.It's working, but I'm seeing in my results...
View Article