Behavior with " -executionpolicy bypass" and signed code
So, I understand that adding -executionpolicy bypass to the shortcut launching a script will allow the script to execute no matter what ExecutionPolicy is set to, but does this also just ignore signed...
View ArticleSet local password with secure startup script
Since CPassword has been deprecated by MSFT, I need a secure method to set the password of the local administrator on all workstations. The workaround script that MSFT provided inthe kb article won't...
View ArticleGet-ADUser and Get-Mailbox
Environment: AD running on Windows 2008R2 and Email on Office 365 (cloud only - not on premise)I am trying to initially find all mailboxes where LitigationHoldEnabled is set to true in a particular OU...
View ArticlePass password to Rename-computer
Hey all as the title says I need help to pass my AD credentials to rename-computer. The problem is when I put it in a loop it asks for them on every machine. How could I store it in a variable and then...
View ArticleNew to Scripting. Getting error "cannot index into a null array"
I'm trying to build a script that will stop a process when it's hung at 45% CPU usage or more. I'm getting the error mentioned in the title. Could someone please review my script and tell me what I'm...
View ArticleGet-Acl where username has access to folders and SubFolders
Hi, I have a script that works only on the path that is defined, but in my environment I have this path with plenty of subfolders underneath this path. How do I get the ACL permission of the user in...
View ArticleRunning CMD command in PS
In PS2, I always use cmd.exe /C to run DOS commands. However, I ran into this scenario: The first try, using cmd.exe /C, failed with the above error. The second try, running the command directly, was...
View Articlewhat is the easiest way to get a list of an Object[] methods and properties?
What is the easiest way to get a list of an Object[] methods and properties? I'm using this now, and I'm not sure why it actually works.% -inputobject [[]]$_ {$_|gm;$_|gm -static}
View ArticleList of Domains and Child Domains
I am working in Windows Server 2008 R2 SP1.Is there a way to list Domains and Child Domains entered this way:http://technet.microsoft.com/en-us/library/cc731541(v=ws.10).aspx
View ArticleRecursively changing permissions on folders with long path names
I've gotten a request to change permissions on specific folders for every branch office my organization has - 260+. I'm ok getting the folders, but I'm not sure the output/variable will be ok to pass...
View Articlemanipulate powershell output
Helloi am asking if someone can help joining the below powerShell outputs 10381_PHYEDU_6_016100_SD_2013* 10381_PHYEDU_6_016100_SC_2012*10381_PHYEDU_6_016100_SC_2014* to be this...
View ArticleA big, a very big and a huge 'big' number - THE GOOD, THE BAD AND THE UGLY
function f{begin{&$s}process{&$s}end{&$s}} $s,$v={$script:v*=$v},2 $(1..2|f),$v,$($v=2) $(1..2|%{f}),$v,$($v=2) $(1..3|%{f}),$v• <-I have no time to waste.
View ArticleAdd multi-value Registery entries
Hello All, I am trying to use the below script to add multi-value registry keythe script is working fine except he is writting only the last value of the variableany help pleaseAdd-PSSnapin...
View ArticleQuery remote XP machine for list of mapped network drives of current logged...
Hi everyone,I have searched high and low for this script but nothing. Is it possible to do this if the XP machine does not have PS installed? Thanks.
View ArticleTrouble getting a ps1 file to execute
I am having trouble getting a ps1 file to execute.All the powershell.exe does is go to the next prompt without executing anything.powershell.exe -noprofile -command "&{ start-process powershell...
View ArticleMerge XML
I have split up what is going to be a very large amount of XML data into multiple files for long term maintenance reasons. However, I need to combine all this information into a single XML object for...
View ArticlePath tool long when using arrays
Hey Powershell people. I'm running into an array issue in powershell where the error "Copy-Item : The specified path, file name, or both are too long" is thrown back at me. However, the odd thing is if...
View ArticleLong file names with [System.IO.Directory]
Hello, I understand the 260 character limitation in certain Windows components and a 32k limitation in NTFS. Unfortunately, some of our users have outdone themselves in creating long paths, but I need...
View Articlefinding long unc paths (254 characters)
Some users are using very long filenames and folder names which creates long unc paths altogether.I want to locate this long UNC path's, is there way to do this with powershell, i am just a beginner...
View ArticleAny way to convert the Exchange PowerShell sets to EXE file?
Any way to convert the Exchange PowerShell sets to EXE file?
View Article