Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $command = '"C:Program FilesTheProgRunit.exe" Hello';
- $command = 'echo "hello world!"';
- $command = "echo `"it`'s`"";
- iex $command
- $command = 'C:somepathsomeexe.exe somearg'
- iex $command
- >> &"C:Program FilesSome ProductSomeExe.exe" "C:some other pathfile.ext"
- $command = '"C:Program FilesSome ProductSomeExe.exe" "C:some other pathfile.ext"'
- iex "& $command"
- function myeval($command) {
- if ($command[0] -eq '"') { iex "& $command" }
- else { iex $command }
- }
- MSBuild /t:Publish --% /p:TargetDatabaseName="MyDatabase";TargetConnectionString="Data Source=.;Integrated Security=True" /p:SqlPublishProfilePath="Deploy.publish.xml" Database.sqlproj
- $path = 'HKLM:SOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionUninstall'
- $app = 'MyApp'
- $apps= @{}
- Get-ChildItem $path |
- Where-Object -FilterScript {$_.getvalue('DisplayName') -like $app} |
- ForEach-Object -process {$apps.Set_Item(
- $_.getvalue('UninstallString'),
- $_.getvalue('DisplayName'))
- }
- foreach ($uninstall_string in $apps.GetEnumerator()) {
- $uninstall_app, $uninstall_arg = $uninstall_string.name.split(' ')
- & $uninstall_app $uninstall_arg
- }
Add Comment
Please, Sign In to add comment